Example

Input

5 3
4
2
5


Output

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

int main(){
    int n,m;
    cin>>n>>m;
    int e[m];
    bool ee[n+1];
    rep(i,n+1)ee[i]=false;
    int a;
    int c = 0 ;
    rep(i,m){
        cin>>e[i];
    }
    for(int i = m-1;i>=0;i--){
        if(ee[e[i]]){
            //cout<<"ee:"<<e[i]<<endl;
            continue;
        }
        cout<<e[i]<<endl;
        ee[e[i]] = true;
    }
    for(int i = 1; i<n+1;i++){
        if(ee[i])continue;
        cout<<i<<endl;
    }
}
