#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, a, mx;
  vector<long long> p;
  scanf("%lld", &n);
  for (long long i = 0; i < n; i++) {
    mx = -1;
    for (long long j = 0; j < n; j++) {
      scanf("%lld", &a);
      if (a > mx) mx = a;
    }
    vector<long long>::iterator it = find(p.begin(), p.end(), mx);
    if (it == p.end())
      p.emplace_back(mx);
    else
      p.emplace_back(mx + 1);
  }
  for (long long i = 0; i < n; i++) {
    printf("%lld", p[i]);
    printf(" ");
  }
  return 0;
}
