Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#!/usr/bin/env python

import sys
import math
import itertools as it
from collections import deque

sys.setrecursionlimit(10000000)

n, m = map(int, raw_input().split())

lst = []
for i in range(m):
    lst.append(input())

lst = list(reversed(lst))
flag = [True for i in range(n + 1)]

for num in lst:
    if flag[num]:
        print num
        flag[num] = False

for i in range(1, n + 1):
    if flag[i]:
        print i

