#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(2 * n);
  set<int> uniq;
  n = 2 * n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    uniq.insert(a[i]);
  }
  if (uniq.size() == 1) return cout << -1 << endl, 0;
  sort(a.begin(), a.end());
  int s1 = 0, s2 = 0;
  for (int i = 0; i < n / 2; i++) {
    s1 += a[i];
  }
  for (int i = n / 2; i < n; i++) {
    s2 += a[i];
  }
  if (s1 != s2) {
    for (int i = 0; i < n; i++) {
      cout << a[i] << " ";
    }
    cout << endl;
  } else {
    swap(a[0], a[n - 1]);
    for (int i = 0; i < n; i++) {
      cout << a[i] << " ";
    }
    cout << endl;
  }
  return 0;
}
