#include <bits/stdc++.h>
using namespace std;
inline string uppercase(string s) {
  long long n = s.size();
  for (long long(i) = 0; i < n; i++)
    if (s[i] >= 'a' && s[i] <= 'z') s[i] = s[i] - 'a' + 'A';
  return s;
}
inline string lowercase(string s) {
  long long n = s.size();
  for (long long(i) = 0; i < n; i++)
    if (s[i] >= 'A' && s[i] <= 'Z') s[i] = s[i] - 'A' + 'a';
  return s;
}
int32_t main() {
  long long n, i;
  i = 0;
  cin >> n;
  long long ar[2 * n];
  for (long long(i) = 0; i < 2 * n; i++) {
    cin >> ar[i];
  }
  sort(ar, ar + 2 * n);
  if (ar[0] == ar[2 * n - 1]) {
    cout << "-1";
  } else {
    for (long long(i) = 0; i < 2 * n; i++) {
      cout << ar[i] << " ";
    }
  }
}
