#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int A[n][n];
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j) cin >> A[i][j];
  int ans[n];
  for (int i = 0; i < n; ++i) {
    int mx = 0, k;
    map<int, int> m;
    set<int> s;
    for (int j = 0; j < n; ++j) {
      ++m[A[i][j]];
      if (mx < m[A[i][j]]) mx = m[A[i][j]], k = A[i][j];
      s.insert(A[i][j]);
    }
    if (s.size() == n)
      ans[i] = n;
    else
      ans[i] = k;
  }
  for (int i = 0; i < n; ++i)
    if (ans[i] == n) {
      ans[i] = n - 1;
      break;
    }
  for (int i = 0; i < n; ++i) cout << ans[i] << " ";
}
