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.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Map.Entry;
import java.util.StringTokenizer;
import java.util.TreeMap;


public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) throws IOException {
		int n=sc.nextInt();
		int[] a=new int[n];
		int[] b=new int[n];
		long sumA=0;
		long sumB=0;
		for (int i = 0; i < a.length; i++) {
			a[i]=sc.nextInt();
			sumA+=a[i];
			
		}
		for (int i = 0; i < b.length; i++) {
			b[i]=sc.nextInt();
			sumB+=b[i];
			
		}
		if(sumA==sumB)
		{
			boolean possible=false;
			for (int i = 0; i < b.length; i++) {
				if(a[0]!=b[i])
				{
					int temp=a[0];
					a[0]=b[i];
					b[i]=temp;
					possible=true;break;
				}
			}
			if (!possible) {
				for (int i = 0; i < b.length; i++) {
					if(a[i]!=b[0])
					{
						int temp=b[0];
						b[0]=a[i];
						a[i]=temp;
						possible=true;break;
					}
				}	
			}
			if(!possible)
			{
				System.out.println(-1);
			}
			else
			{
				boolean first=true;
				for (int i = 0; i < a.length; i++) {
					if(first)
					{
						System.out.print(a[i]);
						first=false;
					}
					else
					{
						System.out.print(" " + a[i]);
					}
				}
				for (int i = 0; i < b.length; i++) {
					System.out.print(" " + b[i]);
				}
			}
		}
		else
		{
			boolean first=true;
			for (int i = 0; i < a.length; i++) {
				if(first)
				{
					System.out.print(a[i]);
					first=false;
				}
				else
				{
					System.out.print(" " + a[i]);
				}
			}
			for (int i = 0; i < b.length; i++) {
				System.out.print(" " + b[i]);
			}
		}	

	}
	
	/*public static void main(String[] args) throws IOException {
		int n=sc.nextInt();
		ArrayList<Integer> odd= new ArrayList<Integer>();
		ArrayList<Integer> even= new ArrayList<Integer>();
		for (int i = 0; i < n; i++) {
			int temp=sc.nextInt();
			if(temp%2==0)
			{
				even.add(temp);
			}
			else
			{
				odd.add(temp);
			}
		}
		Collections.sort(odd);	
		Collections.sort(even);
		if(even.size()>=odd.size())
		{
			boolean first=true;
			for (int i = 0; i < odd.size(); i++) {
				if(odd.get(0)>=even.get(0))
				{
					if(first)
					{
						System.out.println(odd.remove(0) + " " + even.remove(0));
					}
					else
					{
						System.out.println(" " + odd.remove(0) + " " + even.remove(0));
					}
				}
			}
		}
		else
		{
			
		}
		/*if(n%2==0)
		{
			int[] odd= new int[n/2];
			int[] even= new int[n/2];
			for (int i = 0; i < even.length; i++) {
				odd[i]=sc.nextInt();
				even[i]=sc.nextInt();
			}
			Arrays.sort(odd);
			Arrays.sort(even);
			boolean first=true;
			for (int i = 0; i < even.length; i++) {
				if(first)
				{
					System.out.print(even[i] + " " + odd[i]);
					first=false;
				}
				else
				System.out.print(" " + even[i] + " " + odd[i]);
			}
		}
		else
		{
			int[] odd= new int[n/2 + 1];
			int[] even= new int[n/2];
			for (int i = 0; i < even.length; i++) {
				odd[i]=sc.nextInt();
				even[i]=sc.nextInt();
			}
			odd[odd.length-1]=sc.nextInt();
			Arrays.sort(odd);
			Arrays.sort(even);boolean first=true;
			for (int i = 0; i < even.length; i++) {
				if(first)
				{
					System.out.print(even[i] + " " + odd[i]);
					first=false;
				}
				else
				System.out.print(" " + even[i] + " " + odd[i]);
			}
			if(odd.length==1)
			System.out.print(odd[odd.length-1]);	
			else
			System.out.print(" " + odd[odd.length-1]);
		}*/
	
	
	static class Scanner {
		StringTokenizer st;
		BufferedReader br;
 
		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}
 
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
 
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
 
		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
 
		public String nextLine() throws IOException {
			return br.readLine();
		}
 
		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			int start = 0;
			boolean dec = false, neg = false;
			if (x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for (int i = start; i < x.length(); i++)
				if (x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} else {
					sb.append(x.charAt(i));
					if (dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg ? -1 : 1);
		}
 
		public boolean ready() throws IOException {
			return br.ready();
		}
 
	}
}