Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include<iostream>
#include<vector>
#include<algorithm>

#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)

using namespace std;

#define MAX 200010
bool used[MAX];

int main() {
  int n,m;
  cin >> n >> m;
  vector<int> e(m);
  rep(i,m) cin >> e[i];
  reverse(e.begin(),e.end());
  vector<int> answer;
  rep(i,m) {
    if( used[e[i]] ) continue;
    used[e[i]] = true;
    answer.push_back(e[i]);
  }
  rep(i,n) if( !used[i+1] ) answer.push_back(i+1);
  rep(i,n) cout << answer[i] << endl;
  return 0;
}