Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include <cmath>
#include <stack>
#include <queue>
#include <cstdio>
#include <vector>
#include <map>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
#define inf 0x3f3f3f3f
#define met(a,b) memset(a,b,sizeof(a))

int main()
{
    int n,m;
    while(scanf("%d%d",&n,&m)!=EOF)
    {
        map<int,int>mp;
        mp.clear();
        stack<int>s;
        while(!s.empty())
            s.pop();
        while(m--)
        {
            int num;
            scanf("%d",&num);
            if(!mp[num])
            {
                mp[num]=1;
            }
            s.push(num);
        }
        map<int,int> np;
        np.clear();
        while(!s.empty())
        {
            if(!np[s.top()])
            {
                np[s.top()]=1;
                printf("%d\n",s.top());
                s.pop();
            }
            else
                s.pop();
        }
        for(int i=1;i<=n;i++)
        {
            if(!np[i])
                printf("%d\n",i);
        }
        
    }
}