Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include <bits/stdc++.h>
using namespace std;
using i64 = int_fast64_t;
using ui64 = uint_fast64_t;
#define REP(i, n) for (i64 (i) = 0; (i) < (n); ++(i))
#define FOR(i, a, b) for (i64 (i) = (a); (i) < (b); ++(i))

signed main() {

    int N, M;
    cin >> N >> M;
    vector<bool> used(N, false);
    vector<int> Q(M);
    REP(i, M) { cin >> Q[M - 1 - i]; Q[M - 1 - i]--; }

    vector<int> res;
    REP(i, M) {
        if (used[Q[i]]) continue;
        used[Q[i]] = true;
        res.emplace_back(Q[i]);
    }
    REP(i, N) {
        if (used[i]) continue;
        res.emplace_back(i);
    }

    REP(i, N) cout << res[i] + 1 << endl;

}
