#include <bits/stdc++.h>
using namespace std;
int arr[2666];
int main() {
  int a = 0;
  int b = 0;
  int x;
  int n;
  cin >> n;
  priority_queue<int> pq;
  for (int i = 1; i <= 2 * n; i++) {
    cin >> x;
    arr[i] = x;
    pq.push(x);
  }
  for (int i = 1; i <= n; i++) {
    x = pq.top();
    pq.pop();
    a += x;
  }
  for (int i = 1; i <= n; i++) {
    x = pq.top();
    pq.pop();
    b += x;
  }
  if (a == b)
    cout << "-1" << endl;
  else {
    for (int i = 1; i <= 2 * n; i++) {
      pq.push(arr[i]);
    }
    for (int i = 1; i <= 2 * n; i++) {
      cout << pq.top() << " ";
      pq.pop();
    }
    cout << endl;
  }
}
