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