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