n = int(input())
values = list(map(int, input().split()))

original_array = [0] * (2 * n + 1)
original_array[1] = values[0]
valid = True

for i in range(2, 2 * n + 1, 2):
    original_array[i] = values[i // 2 - 1]

for i in range(3, 2 * n + 1, 2):
    original_array[i] = min(original_array[i - 1], original_array[i + 1])

for i in range(2, 2 * n + 1):
    if original_array[i] == 0:
        valid = False
        break

if valid:
    print(" ".join(map(str, original_array[1:])))
else:
    print(-1)
