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.sql.Array;
import java.sql.SQLOutput;
import java.util.*;
import java.io.*;
import java.math.*;

public class MyProgram {
    public static FastIO file = new FastIO();

    private static void solve() {
//        int tt = nextInt();
        int tt = 1;
        long start = 0;
        start = System.currentTimeMillis();
        while (tt-- > 0) {
            int n = nextInt();
            int[] a1 = nextArray(n);
            int[] a2 = nextArray(n);
            Arrays.sort(a1);
            Arrays.sort(a2);
            int sum1 = 0, sum2 = 0;
            for (int i = 0; i < n; i++) {
                sum1 += a1[i];
                sum2 += a2[i];
            }
            if (sum1 == sum2) {
                for (int i = 0; i < n; i++) {
                    for (int k = 0; k < n; k++) {
                        if (a1[i] != a2[k]){
                            int temp = a1[i];
                            a1[i] = a2[k];
                            a2[k] = temp;
                            for (int j = 0; j < n; j++) {
                                System.out.print(a1[j] + " ");
                            }
                            for (int j = 0; j < n; j++) {
                                System.out.print(a2[j] + " ");
                            }
                            return;
                        }
                    }
                }
                System.out.println(-1);
            } else {
                for (int i = 0; i < n; i++) {
                    System.out.print(a1[i] + " ");
                }
                for (int i = 0; i < n; i++) {
                    System.out.print(a2[i] + " ");
                }
            }
        }
        //      System.out.println("Time: " + (System.currentTimeMillis() - start));
    }

    static int func(int a, int s) {
        int sum = 0;
        for (int i = 0; i < s; i++) {
            sum += a % 10;
            a /= 10;
        }
        return sum;
    }

    private static int[] nextArray(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++) a[i] = nextInt();
        return a;
    }

    public static int[][] nextArray2D(int n, int m) {
        int[][] result = new int[n][];
        for (int i = 0; i < n; i++) {
            result[i] = nextArray(m);
        }
        return result;
    }

    public static long pow(long n, long p) {
        long ret = 1L;
        while (p > 0) {
            if (p % 2 != 0L)
                ret *= n;
            n *= n;
            p >>= 1L;
        }
        return ret;
    }

    public static String next() {
        return file.next();
    }

    public static int nextInt() {
        return file.nextInt();
    }

    public static long nextLong() {
        return file.nextLong();
    }

    public static double nextDouble() {
        return file.nextDouble();
    }

    public static String nextLine() {
        return file.nextLine();
    }

    public static class FastIO {
        BufferedReader br;
        StringTokenizer st;
        PrintWriter out;

        public FastIO() {
            br = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }

    public static void main(String[] args) {
        solve();
    }


}