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