#include <bits/stdc++.h>
int main() {
  int n, i, j, temp;
  scanf("%d", &n);
  int* a = (int*)malloc(2 * n * sizeof(int));
  for (i = 0; i < 2 * n; i++) scanf("%d", &a[i]);
  for (i = 1; i < 2 * n; i++)
    for (j = 0; j < 2 * n - i; j++)
      if (a[j] > a[j + 1]) {
        temp = a[j];
        a[j] = a[j + 1];
        a[j + 1] = temp;
      }
  if (a[0] == a[2 * n - 1])
    printf("-1");
  else {
    for (i = 0; i < 2 * n; i++) printf("%d ", a[i]);
  }
}
