#include <bits/stdc++.h>
#pragma comment(linker, "/stack:102400000,102400000")
const double pi = acos(-1.0);
const int INF = 0x3f3f3f3f;
const double eps = 1e-8;
const int MAXN = 300 + 10;
const int MOD = 1e9 + 7;
const int dir[][2] = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}};
const int seed = 131;
int cases = 0;
int arr[100];
int main() {
  int n;
  scanf("%d", &n);
  bool flag = false;
  for (int i = 0; i < n; i++) {
    int max_val = 0;
    for (int j = 0; j < n; j++) {
      scanf("%d", &arr[j]);
      max_val = std::max(max_val, arr[j]);
    }
    int cnt = 0;
    for (int j = 0; j < n; j++)
      if (arr[j] == max_val) ++cnt;
    if (cnt == 1 && !flag)
      printf("%d ", n), flag = true;
    else
      printf("%d ", n - cnt);
  }
  return 0;
}
