Example

Input

5 3
4
2
5


Output

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