#include <bits/stdc++.h>
using namespace std;
int a[2000], n;
int main() {
  cin >> n;
  for (int i = 1; i <= 2 * n; i++) cin >> a[i];
  int s1 = 0, s2 = 0;
  for (int i = 1; i <= n; i++) s1 += a[i];
  for (int j = n + 1; j <= n * 2; j++) s2 += a[j];
  if (s2 != s1) {
    for (int i = 1; i <= 2 * n; i++) cout << a[i] << " ";
    return 0;
  }
  for (int i = 1; i <= n; i++)
    for (int j = n + 1; j <= n * 2; j++)
      if (a[i] != a[j]) {
        swap(a[i], a[j]);
        for (int i = 1; i <= 2 * n; i++) cout << a[i] << " ";
        return 0;
      }
  cout << -1;
}
