#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  long long maxm[n];
  for (long long i = 0; i < n; ++i) {
    maxm[i] = -1;
  }
  for (long long x = 0; x < n; x++) {
    for (long long y = 0; y < n; y++) {
      long long t;
      cin >> t;
      if (t > maxm[y]) {
        maxm[y] = t;
      }
    }
  }
  bool w = 1;
  for (long long i = 0; i < n; i++) {
    if (maxm[i] == n - 1 & w) {
      w = 0;
      cout << n << " ";
    } else {
      cout << maxm[i] << " ";
    }
  }
}
