#include <bits/stdc++.h>
using namespace std;
const long long MAX = 10000001;
int dx[8] = {1, 0, 0, -1, 1, -1, 1, -1};
int dy[8] = {0, 1, -1, 0, 1, -1, -1, 1};
int main() {
  cin.tie(0);
  cout.tie(0);
  std::ios::sync_with_stdio(false);
  long long n, x;
  cin >> n;
  long long m = n;
  map<long long, bool> mm;
  for (int i = 0; i < n; i++) {
    long long mx = 0;
    for (int j = 0; j < m; j++) {
      cin >> x;
      mx = max(mx, x);
    }
    if (mm[mx]) mx++;
    cout << mx << " ";
    mm[mx] = 1;
  }
  return 0;
}
