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