Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include <bits/stdc++.h>
#define rep(i,N) for(int i=0;i<(int)N;i++)
#define rep1(i,N) for(int i=1;i<=(int)N;i++)
#define pb push_back
#define all(c) c.begin(),c.end()
#define show(x) cout<<#x<<" "<<x<<endl
using namespace std;
int ins[100000];
bool is[200001];
int main(){
	int N,M;
	cin>>N>>M;
	rep(i,M) cin>>ins[i];
	reverse(ins,ins+M);
	vector<int> ans;
	rep(i,M){
		int x=ins[i];
		if(is[x]) continue;
		is[x]=1;
		ans.pb(x);
	}
	rep1(i,N) if(!is[i]) ans.pb(i);
	rep(i,N) cout<<ans[i]<<endl;
}