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


if n % 2 == 1:
    s.sort()
    answer = []
    for i in s:
        if i not in answer:
            answer.append(i)
    for i in answer:
        print(i, end = " ")

else:
    print("-1")
