#include <bits/stdc++.h>
using namespace std;
int a[2005];
int main() {
  int n;
  scanf("%d", &n);
  n *= 2;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  sort(a, a + n);
  if (a[0] == a[n - 1])
    cout << "-1" << endl;
  else {
    int flag = 0;
    for (int i = 0; i < n; i++) {
      if (flag) printf(" ");
      if (flag == 0) flag = 1;
      printf("%d", a[i]);
    }
    printf("\n");
  }
}
