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 namespace std;
struct hash_pair {
  template <class T1, class T2>
  size_t operator()(const pair<T1, T2>& p) const {
    auto hash1 = hash<T1>{}(p.first);
    auto hash2 = hash<T2>{}(p.second);
    return hash1 ^ hash2;
  }
};
int64_t power(int64_t a, int64_t b) {
  int64_t ans = 1;
  int64_t k = a;
  while (b > 0) {
    if (b & 1) {
      ans *= k;
      ans %= 1000000007;
    }
    k = (k * k) % 1000000007;
    b = b >> 1;
  }
  return ans;
}
int64_t gcd(int64_t a, int64_t b) {
  if (a == 0) return b;
  if (b == 0) return a;
  return gcd(b, a % b);
}
int64_t add_mod(int64_t a, int64_t b, int64_t m) {
  return ((a % m) + (b % m)) % m;
}
int64_t sub_mod(int64_t a, int64_t b, int64_t m) {
  return ((a % m) - (b % m) + m) % m;
}
int64_t mul_mod(int64_t a, int64_t b, int64_t m) {
  return ((a % m) * (b % m)) % m;
}
void print(double val, int k) {
  cout << fixed << setprecision(k) << val << "\n";
}
int64_t toint(string s) {
  stringstream ss;
  ss << s;
  int64_t x;
  ss >> x;
  return x;
}
void solve() {
  int n;
  cin >> n;
  vector<int64_t> arr(2 * n);
  unordered_map<int, int> um;
  int64_t sum = 0, a = 0;
  for (int i = 0; i < 2 * n; i++) {
    cin >> arr[i];
    sum += arr[i];
    if (i < n) a += arr[i];
    if (um.find(arr[i]) == um.end())
      um[arr[i]] = 1;
    else
      um[arr[i]] += 1;
  }
  if (a != (sum - a)) {
    for (auto val : arr) cout << val << " ";
    return;
  }
  if (um.size() == 1) {
    cout << "-1"
         << "\n";
    return;
  }
  sort(arr.begin(), arr.end());
  for (auto val : arr) cout << val << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
