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