Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define o(a) cout << a << endl
#define int long long
#define first fi;
#define second se;
using namespace std;
typedef pair<int, int> P;

signed main(){
    int n, m;
    cin >> n >> m;
    vector<int> d, e(m);
    vector<bool> f(n + 1, true);
    rep(i, 0, m){
        cin >> e[i];
    }
    repb(i, m - 1, 0){
        if(f[e[i]]){
            d.push_back(e[i]);
            f[e[i]] = false;
        }
    }
    rep(i, 0, d.size()){
        cout << d[i] << endl;
    }
    rep(i, 1, n + 1){
        if(f[i]) cout << i << endl;
    }
}