Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
  ll n,m;
  cin>>n>>m;
  ll u[n],a[m];
  memset(u,0,sizeof(u));
  for(ll i=0;i<m;i++) cin>>a[i];
  for(ll i=m-1;i>=0;i--){
    if(u[a[i]-1]) continue;
    cout<<a[i]<<endl;
    u[a[i]-1]=1;
  }
  for(ll i=0;i<n;i++){
    if(!u[i]) cout<<i+1<<endl;
  }
  return 0;
}