#include <bits/stdc++.h>
long long gcd(long long a, long long b) {
  return b == 0 ? abs(a) : gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, mx = 0;
  cin >> n;
  vector<vector<int>> vv(n, vector<int>(n));
  vector<int> v;
  for (int i = 0; i < n; i++) {
    mx = 0;
    for (int j = 0; j < n; j++) {
      cin >> vv[i][j];
      mx = max(mx, vv[i][j]);
    }
    v.push_back(mx);
  }
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++)
      if (v[i] == v[j]) v[j]++;
  for (int i = 0; i < n; i++) {
    cout << v[i] << " ";
  }
}
