#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  bool a[55] = {0};
  vector<vector<int> > v(n);
  vector<int> sol;
  for (int register i = 0; i < n; i++) {
    bool ok = true;
    memset(a, 0, sizeof(a));
    for (int register j = 0; j < n; j++) {
      int x;
      cin >> x;
      if (a[x]) ok = false;
      a[x] = true;
      v[i].push_back(x);
    }
    if (ok) sol = v[i];
  }
  for (int register i = 0; i < sol.size(); i++)
    if (!sol[i])
      cout << n << " ";
    else
      cout << sol[i] << " ";
  return 0;
}
