#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<vector<int> > v(n, vector<int>(n));
  vector<int> ans(n);
  int ci = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      cin >> v[i][j];
      if (v[i][j] == n - 1) ci = j, ans[j] = n, ans[i] = n - 1;
    }
  int c = n - 1;
  while (--c) {
    for (int i = 0; i < n; i++) {
      if (v[ci][i] == c) {
        ans[i] = c;
        ci = i;
        break;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (i) cout << " ";
    cout << ans[i];
  }
  return 0;
}
