#include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
int n,m,a[200000],b[200000],x;
int main()
{
	scanf("%d%d",&n,&m);
	for (int i=n;i>=1;i--)
	{
		a[i]=n-i+1;
	}
	for (int i=1;i<=m;i++)
	{
		scanf("%d",&x);
		a[n+i]=x;
	}
	for (int i=n+m;i>=1;i--)
	if (!b[a[i]])
	{
		b[a[i]]=1;
		printf("%d\n",a[i]);
	}
}