Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include <bits/stdc++.h>
using namespace std;

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

int main() {
  int n, m;
  cin >> n >> m;
  vector<int> used(n+1);
  vector<int> ans;
  ans.reserve(n+1);
  vector<int> a(m);
  rep(i, m) cin >> a[i];
  rep(i, m) {
    int b = a[m-1-i];
    if(used[b] == 0) {
      ans.push_back(b);
      used[b]++;
    }
  }
  rep(i, n) {
    if(used[i+1] == 0) ans.push_back(i+1);
  }
  rep(i, ans.size()) {
    cout << ans[i] << endl;
  }
  return 0;
}

