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