Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
#define MAX_N 40
#define INF 1000000000
#define MOD 1000000007
using namespace std;
typedef long long ll;
typedef pair<int,int> P;

int n, m;
vector<int> ans;
bool saw[200001];

int main(){
    cin >> n >> m;
    rep(i,m){
        int x;
        cin >> x;
        ans.push_back(x);
    }
    for(int i = ans.size()-1; i >= 0; i--){
        if(saw[ans[i]]) continue;
        cout << ans[i] << endl;
        saw[ans[i]] = true;
    }
    for(int i = 1; i <= n; i++){
        if(saw[i]) continue;
        cout << i << endl;
    }
}