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.util.*;
public class Main {

	static int helper(int[] arr1, int[] arr2,int n)
	{
		int q1=0;
		int q2=0;
		for(int i=0;i<n;i++)
		{
			q1=q1+arr1[i];
			q2=q2+arr2[i];
		}
		if(q1==q2)
		{
			return 1;
		}
		else
		{
			return 0;
		}
	}
	public static void main(String[] args) 
	{
		Scanner s = new Scanner(System.in);
	    int n = s.nextInt();
		int start[] = new int[n];
	    int last[] = new int[n];
	    int sum1 = 0;
	    int sum2 = 0;
	    for(int i=0;i<n;i++)
	    {
	    	int temp = s.nextInt();
	        start[i] = temp;
	        sum1=sum1+temp;
	    }
	    for(int j=0;j<n;j++)
	    {
	    	int temp = s.nextInt();
	        last[j] = temp;
	        sum2=sum2+temp;
	    }
	    int i1=0;
	    while(i1<n)
	    {
	    	if(helper(start,last,n)==0)
	    	{
	    		break;
	    	}
	    	int i2=0;
	        while(i2<n)
	        {
	            if(start[i1]!=last[i2])
	            {
	                int var = last[i2];
	                last[i2] = start[i1];
	                start[i1] = var;
	                break;
	            }
	            else
	            {
	            	i2++;
	            }
	        }
	        i1++;
	    }
	    if(helper(start,last,n)==1)
	    {
	    	System.out.println(-1);
	    }
	    else
	    {
	    	for(int i=0;i<n;i++)
	    	{
	    		System.out.print(start[i]+" ");
	    	}
	    	for(int i=0;i<n;i++)
	    	{
	    		System.out.print(last[i]+" ");
	    	}
	    	
	    }

	}

}
