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.*;
public class Solution {
		static int MAX = (int)1e5+1;
		public static void main(String[] args)throws Exception{
			//InputReader input = new InputReader(System.in);
			Scanner input = new Scanner(System.in);
			OutputStreamWriter out = new OutputStreamWriter(System.out);
			int n = input.nextInt();
			int first[] = new int[n];
			int sec[] = new int[n];
			int sum1 =0,sum2=0;
			for(int i =0;i<n;i++) {first[i] = input.nextInt();sum1+=first[i];}
			for(int i =0;i<n;i++) {sec[i] = input.nextInt();sum2+=sec[i];}
			if(sum1 != sum2) {
				for(int it:first)System.out.print(it+" ");
				for(int it:sec)System.out.print(it+" ");
				System.out.println();return;
			}
			Arrays.sort(first);
			Arrays.sort(sec);
			int z =n-1;
			boolean ok = false;
			for(int i =0;i<n;i++) {
				if(first[i]<sec[z]) {
					sum1-=first[i];
					sum2-=sec[z];
					int t = first[i];
					first[i] = sec[z];
					sec[z] = t;
					sum1+=first[i];
					sum2+=sec[i];
					if(sum1 != sum2) {
						ok = true;
						break;
					}
					z--;
				}
			}
			if(sum1 != sum2){
				for(int it:first)System.out.print(it+" ");
				for(int it:sec)System.out.print(it+" ");
				System.out.println();
			}else System.out.println(-1);
			
			
			
			
			
					
			
		}
		public static void swap(int a,int b,int arr[]){
			int t = arr[a];
			arr[a]= arr[b];
			arr[b] = t;
		}
		
}

class InputReader {
	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;
	
	public InputReader(InputStream stream) {
		this.stream = stream;
	}
	
	public int read() {
		if (numChars == -1) {
			throw new InputMismatchException();
		}
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0) {
				return -1;
			}
		}
		return buf[curChar++];
	}
	
	public int readInt() {
		int c = read();
		while (isSpaceChar(c)) {
			c = read();
		}
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9') {
				throw new InputMismatchException();
			}
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}
	
	public String readString() {
		int c = read();
		while (isSpaceChar(c)) {
			c = read();
		}
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isSpaceChar(c));
		return res.toString();
	}
	
	public double readDouble() {
		int c = read();
		while (isSpaceChar(c)) {
			c = read();
		}
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		double res = 0;
		while (!isSpaceChar(c) && c != '.') {
			if (c == 'e' || c == 'E') {
				return res * Math.pow(10, readInt());
			}
			if (c < '0' || c > '9') {
				throw new InputMismatchException();
			}
			res *= 10;
			res += c - '0';
			c = read();
		}
		if (c == '.') {
			c = read();
			double m = 1;
			while (!isSpaceChar(c)) {
				if (c == 'e' || c == 'E') {
					return res * Math.pow(10, readInt());
				}
				if (c < '0' || c > '9') {
					throw new InputMismatchException();
				}
				m /= 10;
				res += (c - '0') * m;
				c = read();
			}
		}
		return res * sgn;
	}
	
	public long readLong() {
		int c = read();
		while (isSpaceChar(c)) {
			c = read();
		}
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		long res = 0;
		do {
			if (c < '0' || c > '9') {
				throw new InputMismatchException();
			}
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}
	
	public boolean isSpaceChar(int c) {
		if (filter != null) {
			return filter.isSpaceChar(c);
		}
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}
	
	public String next() {
		return readString();
	}
	
	public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}
