#include <bits/stdc++.h>
int main() {
  int n, i, j, a[51][51], ma[51] = {0};
  bool check[51];
  scanf("%d", &n);
  for (i = 0; i < n; i++)
    for (j = 0; j < n; j++) {
      scanf("%d", &a[i][j]);
      if (a[i][j] > ma[i]) ma[i] = a[i][j];
    }
  for (i = 0; i < n; i++) check[i] = false;
  for (i = 1; i <= n; i++)
    for (j = 0; j < n; j++)
      if (ma[j] == i) {
        if (check[i] == true)
          ma[j]++;
        else
          check[i] = true;
      }
  for (i = 0; i < n; i++) printf("%d ", ma[i]);
  return 0;
}
