#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(16);
  int t;
  t = 1;
  while (t--) {
    int n;
    cin >> n;
    vector<int> a(2 * n);
    set<int> s;
    int c1 = 0, c2 = 0;
    for (int i = 0; i < 2 * n; i += 1) {
      cin >> a[i];
      s.insert(a[i]);
    }
    if (s.size() == 1) {
      cout << -1;
      continue;
    }
    sort(a.begin(), a.end());
    for (int i = 0; i < 2 * n; i += 1) {
      cout << a[i] << " ";
    }
  }
}
