You're given an array a of length 2n. Is it possible to reorder it in such way so that the sum of the first n elements isn't equal to the sum of the last n elements?

Input

The first line contains an integer n (1 ≤ n ≤ 1000), where 2n is the number of elements in the array a.

The second line contains 2n space-separated integers a_1, a_2, …, a_{2n} (1 ≤ a_i ≤ 10^6) — the elements of the array a.

Output

If there's no solution, print "-1" (without quotes). Otherwise, print a single line containing 2n space-separated integers. They must form a reordering of a. You are allowed to not change the order.

Examples

Input


3
1 2 2 1 3 1


Output


2 1 3 1 1 2

Input


1
1 1


Output


-1

Note

In the first example, the first n elements have sum 2+1+3=6 while the last n elements have sum 1+1+2=4. The sums aren't equal.

In the second example, there's no solution.
def print_array(arr):
    for element in arr:
        print(element, '', end='')
    print('')

n = int(input())

string_input = input()

arr_input = string_input.split()
jumlah = 0

element_different = []
isFound = False

for index in range(n):
    num1 = int(arr_input[index])
    num2 = int(arr_input[index + n])
    jumlah += num1 - num2
    if index==0:
        if num1 != num2:
            element_different.append((0,num1))
            element_different.append((n,num2))
        else:
            element_different.append((0, num1))
    else:
        if not isFound:
            if num1 != element_different[0][1]:
                element_different.append((index,num1))
                isFound = True
            if num2 != element_different[0][1]:
                element_different.append((index+n,num2))
                isFound = True

if jumlah!=0:
    print_array(arr_input)
else:
    if len(element_different)==1:
        print(-1)
    else:
        index1 = element_different[0][0]
        index2 = element_different[1][0]
        if index2 >= n:
            arr_input[index1], arr_input[index2] = arr_input[index2], arr_input[index1]
            print_array(arr_input)
        elif index < n:
            arr_input[n], arr_input[index2] = arr_input[index2], arr_input[n]
            print_array(arr_input)
        