#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n == 2) {
    cout << "1 2" << endl;
    return 0;
  }
  bool usedN = false;
  for (int i = 0; i < n; i++) {
    int maxi = 0;
    for (int j = 0; j < n; j++) {
      int a;
      cin >> a;
      if (a > maxi) {
        maxi = a;
      }
    }
    if (maxi == n - 1 && !usedN) {
      usedN = true;
      maxi = n;
    }
    cout << maxi << " ";
  }
  cout << endl;
  return 0;
}
