#include <bits/stdc++.h>
using namespace std;
bool check = false;
string s;
int maxi, n, i, j, a;
int main() {
  cin >> n;
  vector<int> v;
  for (i = 0; i < n; i++) {
    maxi = 0;
    for (j = 0; j < n; j++) {
      cin >> a;
      maxi = max(maxi, a);
    }
    if (check == false && maxi == n - 1) {
      maxi = n;
      check = true;
    }
    v.push_back(maxi);
  }
  for (i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  return 0;
}
