Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include <iostream>
#include <math.h>
#include <algorithm>
#include <string>

#define REP(i,n) for(int i=0; i<n; i++)
#define debug(x) cerr << __LINE__ << " : " << #x << " = " << (x) << endl;
 
#define mod 1000000007 //1e9+7(prime number)
#define INF 1000000000 //1e9

using namespace std;
typedef long long ll;

bool used[200005], answered[200005];
int n, m, e, ans[200005];

int main(){
	
	cin >> n >> m;
	
	REP(i,200005){
		used[i] = false;
		answered[i] = false;
	}
	used[0] = true;
	
	REP(i,m){
		cin >> e;
		ans[m-1-i] = e;
		used[e] = true;
	}
	
	// debug(used[1]);
	
	REP(i,m){
		if (!answered[ans[i]]){
			cout << ans[i] << endl;
			answered[ans[i]] = true;
		}
	}
	
	for (int i=1; i<=n; i++){
		if (!used[i]) cout << i << endl;
	}
	
	return 0;
}

