Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <climits>
using namespace std;

int N, M;//?度? n 的序列,有 m 个操作
int F[205000];
bool Jud[205000];

int main()
{
    cin >> N >> M;
    memset(Jud, true, sizeof(Jud));
    for(int i = 1; i <= M; i++)    cin >> F[i];
    for(int i = M; i >= 1; i--)
        if(Jud[F[i]] == true){
            Jud[F[i]] = false;
            cout << F[i] << endl;
        }
    for(int i = 1; i <= N; i++)
        if(Jud[i] == true)
            cout << i << endl;
    return 0;
}