#include <bits/stdc++.h>
using namespace std;
using vi = vector<long long>;
using vvi = vector<vi>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vd = vector<long double>;
using vvd = vector<vd>;
using vs = vector<string>;
using pii = pair<long long, long long>;
using pdd = pair<long double, long double>;
using vpii = vector<pii>;
using vpdd = vector<pdd>;
void solve() {
  long long n;
  cin >> n;
  map<long long, long long> cnt;
  for (long long i = 0; i < n * n; i++) {
    long long x;
    cin >> x;
    cnt[x]++;
  }
  for (auto p : cnt) {
    if (p.second & 1) {
      cout << p.first << " ";
    }
  }
}
void preprocessing() {}
bool MULTI_TEST_CASES = 0;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << setprecision(3);
  cout << fixed;
  preprocessing();
  long long t = 1;
  if (MULTI_TEST_CASES) cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
