#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > res;
int y[100];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    set<int> x;
    for (int j = 1; j <= n; j++) {
      int a;
      scanf("%d", &a);
      x.insert(a);
    }
    int b = x.size() - 1;
    res.push_back(make_pair(b, i));
  }
  sort(res.begin(), res.end());
  int sz = res.size();
  res[sz - 1].first = n;
  for (int i = 0; i < sz; i++) y[res[i].second] = res[i].first;
  for (int i = 1; i <= n; i++) printf("%d ", y[i]);
  return 0;
}
