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.
#!/usr/bin/env python
import os
import operator
import sys
import bisect
import _operator
from _collections import defaultdict
from io import BytesIO, IOBase

def inar():
    return [int(k) for k in input().split()]
def power(x, p,m):
    res = 1
    while p:
        if p & 1:
            res = (res * x) % m
        x = (x * x) % m
        p >>= 1
    return res

def main():
    #mod=1000000007
    # for _ in range(int(input())):
    #     #n=int(input())
    #     st=input()
    #     dic=defaultdict(int)
    #     n=len(st)
    #     for i in range(len(st)):
    #         dic[st[i]]+=1
    #     ans=n-max(dic.values())
    #     for i in range(0,10):
    #         for j in range(0,10):
    #             ok = True
    #             count = 0
    #             for k in range(n):
    #                 if ok:
    #                     if st[k]==str(i):
    #                         count+=1
    #                         ok=False
    #                 else:
    #                     if st[k]==str(j):
    #                         count+=1
    #                         ok=True
    #             if count%2!=0:
    #                 count-=1
    #             #print(count)
    #             ans=min(ans,n-count)
    #     print(ans)
    n=int(input())
    arr=inar()
    counter=0
    for i in range(1,2*n):
        if arr[i]!=arr[0]:
            counter=1
            break
    if counter:
        arr.sort(reverse=True)
        print(*arr)
    else:
        print(-1)

    # n=int(input())
    # arr=inar()
    # odd=0
    # even=0
    # for i in range(n):
    #     if arr[i]%2==0:
    #         even+=1
    #     else:
    #         odd+=1
    # if odd>0 and even>0:
    #     arr.sort()
    #     print(*arr)
    # else:
    #     print(*arr)
    #
    # n = int(input())
    # primes=[1]*(n+1)
    # ans=[0]*(n+1)
    # for i in range(2,int(n**0.5)+1):
    #     if primes[i]==1:
    #         for j in range(i*i,n+1,i):
    #             if primes[j]==1:
    #                 primes[j]=0
    #
    # k=1
    #
    # for i in range(2,int(n**0.5)+1):
    #     if ans[i]==0:
    #         ans[i]=k
    #         k+=1
    #         for j in range(i*i,n+1,i):
    #             if ans[j]==0:
    #                 ans[j]=ans[i]
    # for i in range(2,n+1):
    #     if ans[i]==0:
    #         ans[i]=k
    #         k+=1
    # print(*ans[2:n+1])









BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

if __name__ == "__main__":
    main()