#include <bits/stdc++.h>
using namespace std;
int a[1000][1000];
int b[1000];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j) cin >> a[i][j];
  for (int i = 0; i < n; ++i) {
    int mx = 0;
    for (int j = 0; j < n; ++j) mx = max(mx, a[i][j]);
    b[i] = mx;
  }
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j)
      if (i != j && b[i] == b[j]) b[i]++;
  for (int i = 0; i < n; ++i) cout << b[i] << ' ';
}
