#include <bits/stdc++.h>
using namespace std;
int a[60][60], b[60];
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++) b[i] = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      if (i != j) {
        if (a[i][j] > b[i]) b[i] = a[i][j];
      }
    }
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++)
      if (b[i] == b[j]) {
        b[j]++;
        break;
      }
  }
  for (int i = 0; i < n; i++) cout << b[i] << " ";
}
