#include <bits/stdc++.h>
using namespace std;
int n;
set<int> numbers;
int mx;
int ans[51];
int cnt;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    mx = 0;
    int sz = numbers.size();
    for (int j = 0; j < n; j++) {
      int x;
      cin >> x;
      mx = max(x, mx);
    }
    numbers.insert(mx);
    if (numbers.size() > sz) {
      ans[cnt] = mx;
    }
    cnt++;
  }
  for (int i = 0; i < n; i++) {
    if (ans[i] == 0) {
      cout << n << " ";
    } else {
      cout << ans[i] << " ";
    }
  }
  return 0;
}
