Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include <bits/stdc++.h> 
using namespace std;
#define rep(i,n) for(ll i=0;i<n;i++)
#define all(vec) vec.begin(), vec.end()
#define tmax(x,y,z) max((x),max((y),(z)))
#define tmin(x,y,z) min((x),min((y),(z)))
typedef long long ll;ll MM = 1000000000;ll mod = MM + 7; ll MMM=9223372036854775807;//2^63 -1
ll GCD(ll x, ll y) {if (y == 0) return x;else return GCD(y, x % y);}
ll LCM(ll x, ll y) { return x / GCD(x, y) * y;}
//cout << fixed << setprecision(10);

int main(){
 ll n,m; cin>>n>>m;
  vector<ll>v(m);
  rep(i,m)cin>>v[i];
  reverse(all(v));
  set<ll>s;
  rep(i,m){
    if(s.count(v[i]))continue;
    s.insert(v[i]);
    cout<<v[i]<<endl;
        }
        
  for(ll i=1; i<=n;i++){
  if(!s.count(i))cout<<i<<endl;
  }
}
