#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[55][55], tar[55] = {0};
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int b[51] = {0};
    for (int j = 1; j <= n; j++) {
      scanf("%d", &a[i][j]);
      b[a[i][j]]++;
      if (b[a[i][j]] >= 2) tar[i] = a[i][j];
    }
  }
  int flag = 0;
  for (int i = 1; i <= n; i++) {
    if (tar[i] == 0) {
      tar[i] = n - flag;
      flag++;
    }
  }
  for (int i = 1; i <= n; i++) printf("%d ", tar[i]);
  printf("\n");
  return 0;
}
