Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>

#define REP(i,a,b) for(int i=int(a);i<int(b);i++)

using namespace std;

typedef long long int lli;

int main () {
    int n, m;
    cin >> n >> m;
    vector<int> e(m, 0);
    REP (i, 0, m) cin >> e[i];
    set<int> used;
    for (int i = e.size() - 1; i >= 0; i--) {
        if (used.count(e[i]) == 0) {
            used.insert(e[i]);
            cout << e[i] << endl;
        }
    }
    REP (i, 1, n + 1) {
        if (used.count(i) == 0) {
            cout << i << endl;
        }
    }
    return 0;
}