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