#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.1415926535897923846;
const long long int MOD = 1e9 + 7;
void solve() {
  long long int n;
  cin >> n;
  vector<long long int> a(2 * n);
  long long int sum = 0;
  map<long long int, long long int> mp1;
  for (long long int i = 0; i < 2 * n; i++) {
    cin >> a[i];
    mp1[a[i]]++;
  }
  sort(a.begin(), a.end());
  if (mp1.size() == 1) {
    cout << -1;
    return;
  }
  for (long long int i = 0; i < 2 * n; i++) {
    cout << a[i] << " ";
  }
}
int main() {
  long long int test = 1;
  while (test--) solve();
}
