#include <bits/stdc++.h>
using namespace std;
long long n, a[100005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= 2 * n; ++i) {
    cin >> a[i];
  }
  sort(a + 1, a + 1 + 2 * n);
  if (a[1] == a[2 * n]) {
    cout << -1;
    return 0;
  }
  for (int i = 1; i <= 2 * n; ++i) cout << a[i] << ' ';
}
