Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include <bits/stdc++.h>

#define ALL(a) (a).begin(), (a).end()
#define ll long long

using namespace std;

signed main(){
	int n,m; cin >> n >> m;
	vector<int> a(m);
	for(auto &e : a)cin >> e;
	set<int> s, s1;
	for(int i = 1; i <= n; i++)s1.insert(i);
	vector<int> b;
	for(auto i = a.rbegin(); i != a.rend(); ++i){
		if(s.find(*i) == s.end()){
			s.insert(*i);
			b.push_back(*i);
		}
	}
	for(auto e : b){
		s1.erase(e);
		cout << e << endl;
	}
	for(auto e : s1){
		cout << e << endl;
	}


	
		


	return 0;
}
