#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, i;
  cin >> n;
  long long m = 2 * n;
  long long a[m];
  for (i = 0; i < m; i++) cin >> a[i];
  long long x = 1;
  for (i = 1; i < m; i++) {
    if (a[i] == a[0]) x++;
  }
  if (x == m)
    cout << -1 << "\n";
  else {
    sort(a, a + m);
    for (i = 0; i < m; i++) cout << a[i] << " ";
  }
  return 0;
}
