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