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