Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define INF 1000000
using namespace std;
typedef pair<int, bool> P;
int main()
{
    int N, M;
    scanf("%d%d", &N, &M);
    vector<bool> flag(N + 1);
    vector<int> e(M + 1);
    rep(i, M) scanf("%d", &e[i]);
    for (int i = M - 1; i >= 0; i--)
    {
        if (flag[e[i]])
            continue;
        flag[e[i]] = true;
        printf("%d\n", e[i]);
    }
    for (int i = 1; i <= N; i++)
    {
        if (!flag[i])
            printf("%d\n", i);
    }
    return 0;
}
