Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include<cstdio>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<vector>
#include<queue>
#include<bitset>
#define ll long long
#define N 300003
#define reg register
#define inf 0x3f3f3f3f
#define p 1000000007
#define mid ((l+r)>>1)
#define ls (u<<1)
#define rs (u<<1|1)
using namespace std;

struct node{
    int id,rk;
    node(int id=0,int rk=0):id(id),rk(rk){}
    bool operator < (const node& nd) const{
        return rk < nd.rk;
    }
};

int n,m;
node a[N];

inline void read(int &x);
void print(int x);

signed main(){
    int t;
    read(n),read(m);
    for(int i=1;i<=n;++i) a[i] = node(i,i);
    for(int i=1;i<=m;++i){
        read(t);
        a[t].rk = 1-i;
    }
    sort(a+1,a+1+n);
    for(int i=1;i<=n;++i){
        print(a[i].id);
        putchar('\n');
    }
    return 0;
}

inline void read(int &x){
    x = 0;
    char c = getchar();
    while(c<'0'||c>'9') c = getchar();
    while(c>='0'&&c<='9'){
        x = (x<<3)+(x<<1)+(c^48);
        c = getchar();
    }
}

void print(int x){
    if(x>9) print(x/10);
    putchar(x%10+'0');
}
