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++)
using namespace std;

int main(){
    vector<bool>used(1000000+10,true);
    int n,m;cin>>n>>m;
    vector<int>tiya; for(int i=n;i>=1;i--)tiya.push_back(i);
    rep(i,m){
        int gotiusa; cin>>gotiusa;
        tiya.push_back(gotiusa);
    }
    for(int i=(int)tiya.size()-1;i>=0;i--){
        if(used[tiya[i]]){used[tiya[i]]=false;cout<<tiya[i]<<endl;}
    }
}