#include <iostream>
#include <string>
#include<algorithm>
using namespace std;
int a[1000000];
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n;
cin>>n;
int m;
cin>>m;
for(int i=0;i<m;i++){
cin>>a[i];
}
sort(a+0,a+n);
int cnt=n;
int j=0;
bool cmp=true;
for(int i=0;i<n;i++){
if(a[j]==i){
while(a[j]==i&&j<=m){
j++;
}
}else{
cnt=i;
cout<<cnt<<" ";
cmp=false;
}
}
if(cmp==true){
cout<<n;
}
return 0;
}