Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<queue>
#include<vector>
#include<map>
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define per(i,a,b) for (int i=a;i>=b;i--)
#define LL long long
#define INF (2147483647)
#define sqr(x)  ((x)*(x))
#define mod (1000000007)
using namespace std;
inline void read(int &data){
    data=0; 
	int w=1; char ch=0;
    while (ch!='-'&&(ch<'0'||ch>'9')) ch=getchar();
    if (ch=='-') w=-1,ch=getchar();
    while  (ch>='0' && ch<='9') data=data*10+ch-'0',ch=getchar();
    data=data*w;
}
inline void read(LL &data){
    data=0;
	int w=1; char ch=0;
    while (ch!='-'&&(ch<'0'||ch>'9')) ch=getchar();
    if (ch=='-') w=-1,ch=getchar();
    while  (ch>='0' && ch<='9') data=data*10+ch-'0',ch=getchar();
    data=data*w;
}
inline void write(int x){
    if(x<0) putchar('-'),x=-x;
    if(x>9) write(x/10);
    putchar(x%10+'0');
} 
inline void write(LL x){
    if(x<0) putchar('-'),x=-x;
    if(x>9) write(x/10);
    putchar(x%10+'0');
}
int n,m,v[200005],a[200005];
int main(){
	read(n),read(m);
	memset(v,true,sizeof(v));
	rep(i,1,m){
		read(a[i]);
	}
	per(i,m,1){
		if (v[a[i]]){
			write(a[i]),puts("");
			v[a[i]]=false;
		}
	}
	rep(i,1,n)	if (v[i])	write(i),puts("");
}