#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, c = 0, s = 0, a, d = 0, s1 = 0;
  cin >> n;
  vector<int> v;
  for (i = 0; i < 2 * n; i++) {
    cin >> a;
    if (d == a) c++;
    d = a;
    v.push_back(a);
  }
  sort(v.begin(), v.end());
  for (i = 0; i < n; i++) {
    s = +v[i];
    s1 += v[i + n];
  }
  if (s1 != s && c != 2 * n - 1) {
    for (i = 0; i < 2 * n; i++) cout << v[i] << " ";
    cout << endl;
  } else
    cout << "-1" << endl;
}
