#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(2 * n);
  int ans = 0;
  for (int i = 0; i < 2 * n; i++) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  int c = accumulate(a.begin(), a.begin() + n, 0);
  int b = accumulate(a.begin() + n, a.end(), 0);
  if (c != b) {
    for (int i = 0; i < 2 * n; i++) {
      cout << a[i] << " ";
    }
  } else
    cout << -1;
  return 0;
}
