#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  vector<vector<long long>> v(n + 1, vector<long long>(n + 1));
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      cin >> v[i][j];
    }
  }
  vector<long long> ans(n + 1);
  for (int i = 1; i <= n - 2; i++) {
    for (int r = 1; r <= n; r++) {
      long long cnt = 0;
      for (int c = 1; c <= n; c++) {
        if (v[r][c] == i) {
          cnt++;
        }
      }
      if (cnt == n - i) {
        ans[r] = i;
        break;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    if (ans[i] == 0) {
      ans[i] = n - 1;
      break;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (ans[i] == 0) {
      ans[i] = n;
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
}
