Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include <algorithm>
#include <iostream>
#include <set>
#include <utility>
using int_t = long long int;
using std::cin;
using std::cout;
using std::endl;
const int_t LARGE = 2e5;
int n, m;
int_t seq[LARGE + 1];
bool visited[LARGE + 1];
struct Pair {
    int_t a, b;
} pairs[LARGE + 1];
int main() {
    scanf("%d%d", &n, &m);

    for (int_t i = 1; i <= n; i++) pairs[i] = Pair{i, i};

    int_t var0 = 0;

    for (int_t i = 1; i <= m; i++) {
        int_t x;
        scanf("%lld", &x);
        pairs[x].b = var0;
        var0 -= 1;
    }
    std::sort(pairs + 1, pairs + 1 + n,
              [](const Pair& a, const Pair& b) -> bool { return a.b < b.b; });
    for (int_t i = 1; i <= n; i++) printf("%lld\n", pairs[i].a);
    return 0;
}
