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