#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int maxi;
  bool verif(true);
  vector<int> maxx;
  int tab[n][n];
  for (int i(0); i < n; i++) {
    maxi = 0;
    for (int j(0); j < n; ++j) {
      cin >> tab[i][j];
      if (tab[i][j] > maxi) {
        maxi = tab[i][j];
      }
    }
    maxx.push_back(maxi);
  }
  for (int i(0); i < n; i++) {
    if (maxx[i] == n - 1 && verif == true) {
      cout << n << " ";
      verif = false;
    } else {
      cout << maxx[i] << " ";
    }
  }
  return 0;
}
