n, m = map(int,input().split())
writing = [int(input()) for _ in range(m)]
thread = ()

for i in range(m-1, -1, -1):
    if writing[i] in thread:
        continue
    else:
        thread += (writing[i],)
thread_set = set(thread)
for i in range(n):
    if i+1 in thread_set:
        continue
    else:    
        thread += (i+1,)

for i in range(n):
    print(thread[i])
