#include <bits/stdc++.h>
using namespace std;
int a[100][100];
int p[100];
int main() {
  int n, max, t;
  while (~scanf("%d", &n)) {
    memset(a, 0, sizeof(a));
    memset(p, 0, sizeof(p));
    t = 0;
    for (int i = 0; i < n; i++) {
      max = 0;
      for (int j = 0; j < n; j++) {
        scanf("%d", &a[i][j]);
        if (a[i][j] > max) {
          max = a[i][j];
        }
      }
      p[i] = max;
      if (p[i] == n - 1) {
        p[i] += t;
        t++;
      }
    }
    for (int i = 0; i < n; i++) {
      if (i == 0) {
        printf("%d", p[i]);
      } else {
        printf(" %d", p[i]);
      }
    }
    printf("\n");
  }
  return 0;
}
