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