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.
#include <bits/stdc++.h>
using std::bitset;
using std::cerr;
using std::cin;
using std::complex;
using std::cout;
using std::deque;
using std::endl;
using std::ios_base;
using std::iterator;
using std::map;
using std::max;
using std::max_element;
using std::min;
using std::min_element;
using std::multimap;
using std::multiset;
using std::pair;
using std::queue;
using std::reverse;
using std::set;
using std::sort;
using std::stable_sort;
using std::stack;
using std::string;
using std::swap;
using std::unique;
using std::vector;
namespace MySpace {
struct Small_Segment_Tree {
  vector<int> a;
  int l, r;

 private:
  int __summ(int L, int R, int l, int r, int v) {
    if (L <= l && r <= R) return a[v];
    if (R <= l || r <= L) return 0;
    int m = (l + r) / 2;
    return __summ(L, R, l, m, 2 * v + 1) + __summ(L, R, m, r, 2 * v + 2);
  }
  void __set(int P, int l, int r, int v, int V) {
    if (l + 1 == r) {
      a[v] = V;
      return;
    }
    int m = (l + r) / 2;
    if (P < m) {
      __set(P, l, m, 2 * v + 1, V);
      a[v] = a[2 * v + 1] + a[2 * v + 2];
    } else {
      __set(P, m, r, 2 * v + 2, V);
      a[v] = a[2 * v + 1] + a[2 * v + 2];
    }
  }

 public:
  int Summ(int L, int R) {
    if (R < L) return 0;
    return __summ(L, R + 1, l, r, 0);
  }
  void Set(int P, int V) { __set(P, l, r, 0, V); }
  Small_Segment_Tree(int _n) {
    a.resize(4 * _n);
    l = 0, r = _n;
  }
};
long long inq(long long x, long long q, long long MOD) {
  if (q == 0) return 1;
  long long l = inq(x, q / 2, MOD);
  if (q % 2) return l * l % MOD * x % MOD;
  return l * l % MOD;
}
};  // namespace MySpace
using namespace MySpace;
long long n, m;
long long a[500000];
int main() {
  ios_base::sync_with_stdio();
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = n; i < 2 * n; i++) cin >> a[i];
  sort(a, a + 2 * n);
  long long s1 = 0, s2 = 0;
  for (int i = 0; i < n; i++) s1 += a[i];
  for (int i = n; i < 2 * n; i++) s2 += a[i];
  if (s1 == s2) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < 2 * n; i++) cout << a[i] << " ";
}
