#include <bits/stdc++.h>
using namespace std;
int n;
void solve() {
  cin >> n;
  int a[2 * n];
  map<int, int> cnt;
  for (int i = 0; i < 2 * n; i++) {
    cin >> a[i];
    cnt[a[i]]++;
  }
  if (cnt[a[0]] == 2 * n)
    cout << -1 << endl;
  else {
    sort(a, a + 2 * n);
    for (auto x : a) cout << x << " ";
    cout << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
}
