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;
  scanf("%d %d", &N, &M);
  vector< int > ss(N);
  iota(begin(ss), end(ss), 1);
  for(int i = 0; i < M; i++) {
    int E;
    scanf("%d", &E);
    ss[--E] = -i;
  }
  vector< int > idx(N);
  iota(begin(idx), end(idx), 0);
  sort(begin(idx), end(idx), [&](int a, int b)
  {
    return (ss[a] < ss[b]);
  });

  for(int i = 0; i < N; i++) {
    printf("%d\n", idx[i] + 1);
  }
}