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