Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include<cstdio>
#include<iostream>
#include<memory.h>
using namespace std;
bool vis[200005];
bool vis1[200005];
int a[200005];
int main()
{
    memset(vis,0,sizeof(vis));
    memset(vis1,0,sizeof(vis1));
    int n,m;
    scanf("%d%d",&n,&m);
    int j=0;
    for(int i=0;i<m;i++)
    {
        int b;
        scanf("%d",&b);
        vis[b]=1;
        a[j++]=b;
    }
    while(j--)
    {
        if(vis1[a[j]]==0)
        {
            printf("%d\n",a[j]);
            vis1[a[j]]=1;
        }
    } 
    for(int i=1;i<=n;i++)
    {
        if(vis[i]==0) 
        printf("%d\n",i);
    }
    return 0;
} 