#include <bits/stdc++.h>
using namespace std;
const long long int N = 1e7, MAXN = 5e3, delta = 46639, mod = 1e9 + 7,
                    oo = 1e16;
const long double PI = 3.141592653589793;
long long int cnt[N], a[N];
bool mark[N];
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  long long int n, dis = 0;
  cin >> n;
  for (long long int i = 0; i < 2 * n; i++) {
    cin >> a[i];
    cnt[a[i]]++;
    if (!mark[a[i]]) dis++;
    mark[a[i]] = true;
  }
  if (dis == 1) return cout << (-1), 0;
  for (long long int i = N - 100; i >= 1; i--)
    for (long long int j = 0; j < cnt[i]; j++) cout << i << " ";
  return 0;
}
