#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n][n];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) cin >> a[i][j];
  }
  int res[n];
  int k = n;
  for (int i = 0; i < n; i++) {
    set<int> s;
    for (int j = 0; j < n; j++) {
      s.insert(a[i][j]);
    }
    if (s.size() == n) {
      res[i] = k;
      k--;
    } else {
      res[i] = s.size() - 1;
    }
  }
  for (int i = 0; i < n; i++) cout << res[i] << " ";
  return 0;
}
