Example

Input

5 3
4
2
5


Output

5
2
4
1
3
n, m = map(int, input().split())
e = [int(input()) for _ in range(m)]
b = [1] * (n+1)
for v in e[::-1]:
    if b[v]:
        b[v] = 0
        print(v)
for i in range(1, n+1):
    if b[i]:
        print(i)