#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 9;
long long n, x;
map<long long, long long> mp;
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n * n; i++) cin >> x, mp[x]++;
  for (auto it : mp)
    if (it.second & 1) n--, it.second--, cout << it.first << " ";
  while (n) {
    x = mp.rbegin()->first;
    if (mp.rbegin()->second & 1)
      mp.erase(x);
    else
      n--, cout << x << " ";
  }
  cout << endl;
  return 0;
}
