#include <bits/stdc++.h>
using namespace std;
int use[51];
int main() {
  int arr[51];
  int n, a[51][51], i, j;
  cin >> n;
  for (i = 1; i <= n; i++) {
    arr[i] = 100;
  }
  for (i = 1; i <= n; i++) {
    int mx = 0;
    for (j = 1; j <= n; j++) {
      cin >> a[i][j];
      mx = max(a[i][j], mx);
    }
    arr[i] = mx;
  }
  for (i = 1; i <= n; i++) {
    if (arr[i] == n - 1) {
      arr[i] = n;
      break;
    }
  }
  for (i = 1; i <= n; i++) {
    cout << arr[i] << ' ';
  }
  cout << endl;
  return 0;
}
