#include <bits/stdc++.h>
using namespace std;
map<int, int> M;
map<int, int>::iterator it;
int n, cnt, num, x, ans[550];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n * n; i++) {
    scanf("%d", &x);
    M[x]++;
  }
  cnt = n * n;
  for (it = M.begin(); it != M.end(); it++) {
    if (cnt == n) break;
    while (it->second >= 2) {
      it->second -= 2;
      cnt -= 2;
      if (cnt == n) break;
    }
  }
  for (it = M.begin(); it != M.end(); it++) {
    while (it->second > 0) {
      num++;
      it->second--;
      ans[num] = it->first;
    }
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  return 0;
}
