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