16 lines
315 B
Python
16 lines
315 B
Python
n, m = map(int, input().split())
|
|
rungs = [int(input()) for _ in range(m)]
|
|
|
|
res = [
|
|
0,
|
|
] * n
|
|
for element in range(1, n + 1):
|
|
pos = element
|
|
for r in rungs:
|
|
if pos == r:
|
|
pos += 1
|
|
elif pos == r + 1:
|
|
pos -= 1
|
|
res[pos - 1] = element
|
|
print("\n".join(map(str, res)))
|