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.*;
import java.util.*;
import java.math.*;
import java.lang.reflect.Array;

public class Main {
    static final int MOD = 1000000007; // 1e9 + 7
    static final boolean AUTO_FLUSH = false; // slow if true
    // int = num(); // long = ll();
    // string = next(); // a string line = line();
    // ---------------------------------- \
    @SuppressWarnings("unchecked")
    void SOLVE_THE_PROBLEM() throws Exception {
        int n = num();
        int[] arr = new int[2*n];
        for (int i = 0; i < 2*n; i++)
            arr[i] = num();
        Arrays.sort(arr);
        long sum = 0;
        for (int i = 0; i < n; i++)
            sum += arr[i];
        long sum2 = 0;
        for (int i = n; i < 2*n; i++)
            sum2 += arr[i];
        if (sum == sum2) {
            outln(-1);
            return;
        }
        for (int i : arr)
            out(i + " ");
        outln();
    }
    // ---------------------------------- \
    public static void main(String[] args) throws Exception {
        new Thread(null, () -> {
            try {
                startTime();
                new Main().SOLVE_THE_PROBLEM();
                boolean endsWithEnter = TO_BE_PRINTED.length() == 0 || TO_BE_PRINTED.charAt(TO_BE_PRINTED.length() - 1) == '\n';
                flush();
                if (!endsWithEnter)
                    log('\n');
                logTime();
                logMem();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }, "Main", 1<<26).start();
    }
    static Random RAND = new Random();
    static int random(int from, int to) {
        return RAND.nextInt(to-from+1)+from;
    }
    static void logTime() {
        log("Time: " + getTime() + "ms");
    }
    static void logMem() {
        log("Memory (End): " + (int) (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1024 + " KB");
    }
    static long ll() {
        return Long.parseLong(next());
    }
    static int num() {
        return Integer.parseInt(next());
    }
    static void generateInputMode() throws Exception {
        System.setOut(new PrintStream(new FileOutputStream("F://PROGRAMMING/input.txt")));
    }
    static String line() {
        if (!tokenize())
            return null;
        INPUT_STREAM.setLength(0);
        if (STRING_TOKENIZER.hasMoreTokens())
            INPUT_STREAM.append(STRING_TOKENIZER.nextToken());
        while (STRING_TOKENIZER.hasMoreTokens())
            INPUT_STREAM.append(' ').append(STRING_TOKENIZER.nextToken());
        return INPUT_STREAM.length() == 0 ? null : INPUT_STREAM.toString();
    }
    static void startTime() {
        TIME_COMPLEXITY = System.currentTimeMillis();
    }
    static long getTime() {
        return System.currentTimeMillis() - TIME_COMPLEXITY;
    }
    static void flush() {
        System.out.print(TO_BE_PRINTED.toString());
        TO_BE_PRINTED.setLength(0);
    }
    static void out(Object o) {
        TO_BE_PRINTED.append(o.toString());
        if (AUTO_FLUSH)
            flush();
    }
    static void _log(String s) {
        System.err.print(s);
    }
    static void _logln(String s) {
        System.err.println(s);
    }
    static void _logln() {
        System.err.println();
    }
    static void outln(Object o) {
        out(o);
        outln();
    }
    static void outln() {
        out("\n");
    }
    static class Pair implements Comparable<Pair> {
        public int a, b;
        public Pair(int a, int b) {
            this.a = a;
            this.b = b;
        }
        public static Pair of(int a, int b) {
            return new Pair(a, b);
        }
        public int compareTo(Pair p) {
            if (a == p.a)
                return Integer.compare(b, p.b);
            return Integer.compare(a, p.a);
        }
        public String toString() {
            return "[" + a + "," + b + "]";
        }
        public boolean equals(Pair p) {
            return p.a == a && p.b == b;
        }
    }
    static void logArr(Object val) {
        Class<?> valKlass = val.getClass();
        Object[] outputArray = null;
        for(Class<?> arrKlass : new Class<?>[] { int[].class, float[].class, double[].class, boolean[].class, 
            byte[].class, short[].class, long[].class, char[].class }) {
            if (valKlass.isAssignableFrom(arrKlass)) {
                int arrlength = Array.getLength(val);
                outputArray = new Object[arrlength];
                for(int i = 0; i < arrlength; ++i)
                    outputArray[i] = Array.get(val, i);
                break;
            }
        }
        if(outputArray == null)
            outputArray = (Object[])val;
        logArr0(outputArray);
    }
    static void logArr0(Object[] objs) {
        _log("* " + objs[0]);
        for (int i = 1; i < objs.length; i++)
            _log(objs[i].toString().equals("\n") ? "\n>" : (" " + objs[i]));
        _logln();
    }
    static void log(Object... objs) {
        logArr0(objs);
    }
    static String next() {
        return tokenize() ? STRING_TOKENIZER.nextToken() : null;
    }
    static boolean tokenize() {
        if (STRING_TOKENIZER == null || !STRING_TOKENIZER.hasMoreTokens()) {
            try {
                STRING_TOKENIZER = new StringTokenizer(STREAM_READER.readLine());
            } catch (Exception e) {
                return false;
            }
        }
        return true;
    }
    static long TIME_COMPLEXITY;
    static BufferedReader STREAM_READER = new BufferedReader(new InputStreamReader(System.in), 32768);
    static StringTokenizer STRING_TOKENIZER;
    static StringBuilder INPUT_STREAM = new StringBuilder(), TO_BE_PRINTED = new StringBuilder();
}