#include <bits/stdc++.h>
using namespace std;
int a[250000];
int main() {
  long long n, i, j, sum = 0;
  cin >> n;
  for (i = 0; i < n * n; i++) {
    cin >> a[i];
  }
  sort(a, a + (n * n));
  for (i = 1; i < n * n; i += 2) {
    if (a[i] != a[i - 1]) {
      cout << a[i - 1] << " ";
      i--;
      sum++;
    }
  }
  if (sum != n) {
    cout << a[(n * n) - 1];
  }
  return 0;
}
