#include <bits/stdc++.h>
using namespace std;
const int N = 55;
const int inf = (int)2e9;
const double eps = 1e-9;
int mx[N], grid[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      int x;
      scanf("%d", &x);
      mx[i] = max(mx[i], x);
      mx[j] = max(mx[j], x);
    }
  }
  for (int i = 0; i < n; i++) {
    if (mx[i] == n - 1) {
      mx[i] = n;
      break;
    }
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", mx[i]);
  }
}
