#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n, i, j, k, a[100005], b[100005], c[100005];
  while (~scanf("%d", &n)) {
    for (i = 0; i < n; i++) {
      for (j = 0; j < n; j++) {
        scanf("%d", &a[j]);
      }
      sort(a, a + n);
      b[i] = a[n - 1];
      c[i] = b[i];
    }
    sort(b, b + n);
    k = b[n - 1];
    m = 0;
    for (i = 0; i < n; i++) {
      if (c[i] == k && m == 0) {
        printf("%d ", c[i] + 1);
        m = 1;
      } else
        printf("%d ", c[i]);
    }
    printf("\n");
  }
  return 0;
}
