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.util.function.Function;
import java.util.stream.*;

public class Main {

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        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());
        }
    }

    public static class MyObject<T> {
        int first;
        T second;


        MyObject(int i, T j) {
            this.first = i;
            this.second = j;
        }
    }

    static class Vertex {
        int vertextId;
        List<Vertex> adjacentVertices;

        Vertex(int id) {
            this.vertextId = id;
            adjacentVertices = new ArrayList<>();
        }

        void addEdge(Vertex vertex) {
            adjacentVertices.add(vertex);
        }
    }

    static class Graph {
        int numberOfVertices;
        List<Vertex> vertices;
        List<Integer> lowestIndex;
        List<Integer> indexes;
        Set<MyObject> bridges;
        Set<Integer> cuttingVertices;

        Graph(int n) {
            this.numberOfVertices = n;
            this.vertices = new ArrayList<>();
            this.lowestIndex = new ArrayList<>();
            this.indexes = new ArrayList<>();
            this.bridges = new HashSet<>();
            this.cuttingVertices = new HashSet<>();
            IntStream.rangeClosed(0, n).boxed().map(Vertex::new).forEach(vertices::add);
            IntStream.range(0, n).boxed().map(integer -> 0).forEach(lowestIndex::add);
            IntStream.range(0, n).boxed().map(integer -> 0).forEach(indexes::add);
        }

        List<Vertex> getVertices(int u) {
            return this.vertices.get(u).adjacentVertices;
        }

        void addEdge(int u, int v) {
            Vertex vertexU = vertices.get(u);
            Vertex vertexV = vertices.get(v);
            vertexU.addEdge(vertexV);
            vertexV.addEdge(vertexU);
        }

        boolean isNotVisited(int u) {
            return indexes.get(u).equals(0);
        }

        int getLowestIndex(int u) {
            return lowestIndex.get(u);
        }

        int getIndex(int u) {
            return indexes.get(u);
        }

        void setIndex(int u, int value) {
            indexes.set(u, value);
        }

        void setLowestIndex(int u, int value) {
            lowestIndex.set(u, value);
        }

        void increaseBridge(int u, int v) {
            this.bridges.add(new MyObject<>(u, v));
        }

        void increaseCuttingVertex(int u) {
            this.cuttingVertices.add(u);
        }
    }

    public static void main(String[] args) {
        FastReader fr = new FastReader();
        PrintWriter out = new PrintWriter(System.out);
        int n = fr.nextInt();
        List<Integer> input = IntStream.range(0, n * 2).boxed().map(integer -> fr.nextInt()).collect(Collectors.toList());
        int secondSum = input.stream().skip(n).reduce(0, (a, b) -> a + b);
        int firstSum = input.stream().limit(n).reduce(0, (a, b) -> a + b);

        if (firstSum != secondSum) {
            input.forEach(integer -> System.out.print(integer + " "));
            return;
        }

        for (int index = 0; index < n; index++) {
            int firstData = input.get(index);
            int secondIndex = IntStream.range(n, 2 * n).boxed().filter(integer -> input.get(integer) != firstData).findAny().orElse(-1);
            if (secondIndex != -1) {
                int tmp = input.get(index);
                input.set(index, input.get(secondIndex));
                input.set(secondIndex, tmp);
                input.forEach(integer -> System.out.print(integer + " "));
                return;
            }
        }

        out.print(-1);
        out.close();
    }

    private static List<String> patition(String s) {
        List<String> result = new ArrayList<>();
        int count = 1;
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append('(');
        for (int i = 1; i < s.length(); i++) {
            stringBuilder.append(s.charAt(i));
            count += (s.charAt(i) == '(' ? 1 : -1);
            if (count == 0) {
                result.add(stringBuilder.toString());
                stringBuilder = new StringBuilder();
            }
        }

        return result;
    }

    private static String getResult(String s, int res) {
        int count = 0;
        Stack<MyObject<Character>> stack = new Stack<>();
        Stack<MyObject<Integer>> stackResult = new Stack<>();

        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            MyObject<Character> myObject = new MyObject<>(i, c);

            if (c == '(') {
                stack.push(myObject);
                if (count > 0)
                    count--;
                if (!stackResult.isEmpty())
                    stackResult.pop();
            } else {
                count++;
                MyObject<Character> inStack = stack.pop();
                stackResult.push(new MyObject<>(inStack.first, i));

                if (count == res) {
                    break;
                }
            }
        }

        final Set<Integer> set = new HashSet<>();
        stackResult.forEach(integerMyObject -> {
            set.add(integerMyObject.first);
            set.add(integerMyObject.second);
        });

        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < s.length(); i++) {
            stringBuilder.append(set.contains(i) ? 1 : 0);
        }

        return stringBuilder.toString();
    }

    private static int getDept(String s) {
        int count = 0;
        int max = 0;
        for (int i = 0; i < s.length(); i++) {
            count += (s.charAt(i) == '(') ? 1 : -1;
            max = Math.max(max, count);
        }
        return max;
    }
}