Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include <iostream>
#include <queue>
#include <vector>
#include <cstdio>
#include <set>
#include <algorithm>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(n);i++)
const int INF = 1e9;

int e[100010];
int main(void){
	int n, m; cin >> n >> m;
	deque<int> dq;
	rep(i, m){
		int tmp; cin >> tmp;
		e[i] = tmp;
		dq.push_front(tmp);
	}

	set<int> s;
	for (int i = 0; i < m; ++i){
		// printf("dp %d\n", dq[i]);
		if(s.count(dq[i]) == 0){
			printf("%d\n", dq[i]);
		}
		s.insert(dq[i]);
	}
	for (int i = 1; i <= n; ++i){
		if(s.count(i) == 0){
			printf("%d\n", i);
		}
	}
	return 0;
}