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