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 int long long
using namespace std;
typedef pair<int, int> P;

signed main(){
    int n, m;
    cin >> n >> m;
    vector<int> a(m), ans;
    set<int> st;
    rep(i, 0, m){
        cin >> a[i];
    }
    repb(i, m - 1, 0){
        if(!st.count(a[i])){
            st.insert(a[i]);
            ans. push_back(a[i]);
        }
    }
    rep(i, 0, ans. size()){
        cout << ans[i] << endl;
    }
    rep(i, 1, n + 1){
        if(!st.count(i)){
            cout << i << endl;
        }
    }
}