Example

Input

5 3
4
2
5


Output

5
2
4
1
3
/*
10 8
1 4 7 3 4 10 1 3
*/
#include<iostream>
#include<cstdlib>
#include<algorithm>
#include<cstdio> 
using namespace std;
int e[200007];
int a[200007];
int main()
{
	int n,m,tem;
	scanf("%d%d",&n,&m);
	for(int i=1;i<=m;++i){
		scanf("%d",&e[i]);
	    a[e[i]]++;
	}
	for(int i=m;i>=1;i--)
	{
		if(a[e[i]]>0){
		printf("%d\n",e[i]);
	    a[e[i]]=-1;
		}
	}
	for(int i=1;i<=n;i++)
	if(!a[i])printf("%d\n",i);
	return 0;
}