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.
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStreamReader;
                      /*****Code by AYUSH BAHUGUNA.*****/
public class codeforces
{
    public static void main(String[] args)
    {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        solution obj = new solution();
        //.....Enter the number of test cases over here.
        int test=1;
        obj.solve(test, in, out);
        out.close();
    }

    static class solution
    {
        public void solve(int testCases, InputReader sc, PrintWriter out)
        {
            for (int ii=0;ii<testCases;ii++)
            {
                int n=sc.nextInt();
                int a[]=new int[2*n];
                a[0]=sc.nextInt();
                boolean ch=true;
                for (int i=1;i<2*n;i++)
                {
                    a[i]=sc.nextInt();
                    if (a[i]!=a[i-1])ch=false;
                }
                if (ch)out.write("-1\n");
                else
                {
                    long sum1=0,sum2=0;
                    for (int i=0;i<n;i++){sum1+=a[i];sum2+=a[2*n-1-i];}
                    if (sum1==sum2)
                    {
                        int ct=0;
                        for (int i=0;i<n;i++)
                        {
                            for (int j=n;j<2*n;j++)
                            {
                                if (a[i]!=a[j])
                                {
                                    int temp=a[i];
                                    a[i]=a[j];
                                    a[j]=temp;
                                    ct++;
                                    break;
                                }
                            }
                            if (ct>0)break;
                        }
                    }
                    for (int i=0;i<2*n;i++)out.print(a[i]+" ");
                    out.write("\n");
                }
            }
        }
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}