#include <bits/stdc++.h>
int main() {
  int n = 0;
  scanf("%d", &n);
  int matrix[300000] = {0};
  for (int i = 0; i < n * n; i++) {
    scanf("%d", &matrix[i]);
  }
  std::sort(matrix, matrix + n * n);
  int razF = matrix[0], d = 1, ans[100000] = {0};
  for (int i = 1, ia = 0; i <= n * n; i++) {
    if (matrix[i] == razF) {
      d++;
    } else {
      if (d % 2) {
        ans[ia] = matrix[i - 1];
        ia++;
      }
      d = 1;
      razF = matrix[i];
    }
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", ans[i]);
  }
  printf("\n");
  return 0;
}
