Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pii pair<int, int>
#define eb emplace_back
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep3(i, l, n) for (int i = l; i < (n); ++i)
#define sz(v) (int)v.size()
#define inf (int)(1e9+7)
template<typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { if (a > b) { a = b; return 1; } return 0; }
template<typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { if (a < b) { a = b; return 1; } return 0; }
template<typename T> T gcd(T a, T b) { if (b == 0) return a; return gcd(b, a % b); }




int table[200001];

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    
    int n, m;
    cin >> n >> m;
    vector<int> a;
    vector<int> x(m);
    rep(i, m) cin >> x[i];
    for (int i = m - 1; i >= 0; --i) {
        if (table[x[i]]) continue;
        table[x[i]] = 1;
        a.eb(x[i]);
    }
    rep3(i, 1, n + 1) if (table[i] == 0) a.eb(i);
    rep(i, n) cout << a[i] << endl;
}

