Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include <bits/stdc++.h>

using namespace std;

int main()
{
  int n, m;
  cin >> n >> m;
  vector<int> E;
  for(int i = 0, e; i < m; i++) cin >> e, E.push_back(e);
  reverse(E.begin(), E.end());
  bool used[200020] = {false};
  for(int e : E) if(!used[e]) cout << e << endl, used[e] = true;
  for(int i = 1; i <= n; i++) if(!used[i]) cout << i << endl;
  return 0;
}