#include <bits/stdc++.h>
using namespace std;
map<int, int> m;
vector<int> v;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n * n; i++) {
    int x;
    cin >> x;
    if (m[x] == 0) v.push_back(x);
    m[x]++;
  }
  if (m.size() == 1) {
    map<int, int>::iterator it = m.begin();
    while (n--) cout << it->first << ' ';
  }
  for (map<int, int>::iterator it = m.begin(); it != m.end(); it++) {
    if (it->second % 2) cout << it->first << ' ';
  }
  return 0;
}
