Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <numeric>
#include <array>
#include <cmath>
#include <memory>
using namespace std;
//変数デバッグ
#define DEB(variable) cout << #variable << '=' << variable << endl

//for簡易表記(引数ミス防止)
#define FOR(LoopVariable,numberOFbegin,numberOFend) for (int LoopVariable = (numberOFbegin); (LoopVariable) < (numberOFend); (LoopVariable)++)
#define DEFOR(LoopVariable,numberOFbegin,numberOFend) for (int LoopVariable = (numberOFbegin)-1; (LoopVariable) >= (numberOFend); (LoopVariable)--)
#define REP(LoopVariable,numberOFend) for(int LoopVariable = 0;(LoopVariable)<(numberOFend);LoopVariable++)

constexpr long long int linf = numeric_limits<long long int>::max()-5;
constexpr int inf= numeric_limits<int>::max()-5;
constexpr long long int mod = 1000000007;

int main(){

    int n,m;
    cin>>n>>m;
    vector<pair<long long int,long long int>> v(n);
    REP(i,n){
        v[i]=make_pair(linf,i+1);
    }
    long long int tmp;
    REP(i,m){
        cin>>tmp;
        v[tmp-1]=make_pair(-i,v[tmp-1].second);
    }
    /*
    REP(i,n){
        cout << v[i].first << " " << v[i].second << endl;
    }*/
    sort(v.begin(),v.end());
    
    REP(i,n){
        cout<<v[i].second<<endl;
    }

    return 0;
}

