#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long a[2 * n];
  for (int i = 0; i < 2 * n; i++) {
    cin >> a[i];
  }
  long long sum1 = 0, sum2 = 0;
  for (int i = 0; i < n; i++) {
    sum1 += a[i];
  }
  for (int i = n; i < 2 * n; i++) {
    sum2 += a[i];
  }
  int x = a[0];
  int flag = 1;
  for (int i = 0; i < 2 * n; i++) {
    if (x != a[i]) {
      flag = 0;
      break;
    }
  }
  int done = 0;
  if (flag) {
    cout << "-1\n";
  } else if (sum1 == sum2) {
    for (int i = 0; i < n; i++) {
      for (int j = n; j < 2 * n; j++) {
        if (a[i] != a[j]) {
          long long temp = a[i];
          a[i] = a[j];
          a[j] = temp;
          done = 1;
        }
        if (done) {
          break;
        }
      }
      if (done) {
        break;
      }
    }
    for (int i = 0; i < 2 * n; i++) {
      cout << a[i] << " ";
    }
  } else if (sum1 != sum2) {
    for (int i = 0; i < 2 * n; i++) {
      cout << a[i] << " ";
    }
  }
  return 0;
}
