Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i,n) for(int i = 0; i < (int)(n); ++i)
#define DEBUG(x) cerr << #x << " = " << x << endl
bool touch[200001];
signed main() {
  int N, M; cin >> N >> M;
  vector<int> ord;
  memset(touch, -1, sizeof(touch));
  REP(i,M) {
    int k; cin >> k;
    touch[k] = false;
    ord.push_back(k);
  }
  set<int> S;
  reverse(ord.begin(), ord.end());
  for(int k : ord) {
    if(!S.count(k)) {
      cout << k << endl;
      S.insert(k);
    }
  }
  // cout << "-" << endl;
  for(int i = 1; i <= N; ++i) {
    if(touch[i]) {
      cout << i << endl;
    }
  }
}