#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  set<int> s;
  int arr[n][n];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> arr[i][j];
    }
  }
  map<int, int> mp;
  for (int i = 1; i <= n; i++) mp[i] = -1;
  int k = 1;
  while (k != n - 1) {
    for (int i = 0; i < n; i++) {
      if (s.find(i) != s.end()) continue;
      bool flag = true;
      for (int j = 0; j < n; j++) {
        if (s.find(j) != s.end() || i == j) continue;
        if (arr[i][j] != k) {
          flag = false;
          break;
        }
      }
      if (flag) {
        s.insert(i);
        mp[i + 1] = k;
      }
    }
    k++;
  }
  set<int>::iterator it = s.begin();
  for (int i = 1; i <= n; i++)
    if (mp[i] == -1) {
      mp[i] = k;
      k++;
    }
  for (int i = 1; i <= n; i++) cout << mp[i] << " ";
}
