#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::sort;
using std::vector;
int main() {
  int n;
  cin >> n;
  vector<int> v;
  v.resize(2 * n);
  for (int i = 0; i < (n * 2); i++) cin >> v[i];
  sort(v.begin(), v.end());
  if (v[0] == v[2 * n - 1]) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < (2 * n); i++) {
    cout << v[i] << " ";
  }
}
