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