Example

Input

5 3
4
2
5


Output

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

#define int long long

#define PB push_back
#define PPB pop_back
#define MK make_pair
#define ALL(V) V.begin(), V.end()
typedef pair<int, int> pii;
typedef pair<double, double> pdd;
typedef pair<string, int> psi;
typedef pair<int, pii> pipii;

static const int INF = 1LL << 61;
//static const int MOD = 1000000007;
static const int MAX_N = 200005;

int flg[MAX_N];
int n, m;
vector<int> gedo;

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    cin >> n >> m;

    for (int i = n; 0 < i; --i) gedo.PB(i);

    for (int i = 0; i < m; ++i) {
        int t;
        cin >> t;
        flg[t];
        gedo.PB(t);
    }

    for (auto it = gedo.rbegin(); it != gedo.rend(); ++it) {
        if (flg[*it]) continue;
        cout << *it << endl;
        flg[*it] = true;
    }

    for (int i = 1; i <= n; ++i) if (!flg[i]) cout << i << endl;
}