#include <bits/stdc++.h>
int main() {
  int a[55][55], i, j, max, flag, b[55], n;
  memset(a, 0, sizeof(a));
  memset(b, 0, sizeof(b));
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      scanf("%d", &a[i][j]);
      if (j == 0)
        max = a[i][j];
      else if (max < a[i][j])
        max = a[i][j];
    }
    b[i] = max;
  }
  for (i = 0; i < n; i++) {
    if (b[i] == n - 1) {
      b[i] = n;
      break;
    }
  }
  for (i = 0; i < n; i++) {
    if (i != 0) printf(" ");
    printf("%d", b[i]);
  }
  return 0;
}
