N, M = map(int, input().split())

# aを逆から見てthreadから削除しsetにしてくっつける
thread = [i for i in range(1,N+1)]
a = []
for i in range(M):
    a.append(int(input()))

a = set(a[::-1])
thread = set(thread) - a

res = list(a) + list(thread)

for i in range(N):
    print(res[i])


3a40070ea68d71e728d4386f1b9c4fc9692716ef
<mask token>

<mask token>
for i in range(M):
    a.append(int(input()))
<mask token>
for i in range(N):
    print(res[i])

N, M = map(int, input().split())
thread = [i for i in range(1, N + 1)]
a = []
for i in range(M):
    a.append(int(input()))
a = set(a[::-1])
thread = set(thread) - a
res = list(a) + list(thread)
for i in range(N):
    print(res[i])

N, M = map(int, input().split())

# aを逆から見てthreadから削除しsetにしてくっつける
thread = [i for i in range(1,N+1)]
a = []
for i in range(M):
    a.append(int(input()))

a = set(a[::-1])
thread = set(thread) - a

res = list(a) + list(thread)

for i in range(N):
    print(res[i])

