Example

Input

5 3
4
2
5


Output

5
2
4
1
3
N,M = map(int,input().split())
query = [int(input()) for _ in range(M)]
ans = []
set_ = set()
for q in query[::-1]:
    if q not in set_:
        ans.append(q)
        set_.add(q)
for i in range(1,N+1):
    if i not in set_:
        ans.append(i)
print(*ans,sep="\n")
