#include <bits/stdc++.h>
using namespace std;
void deb(int A[], int n) {
  for (int i = 0; i < n; i++) {
    cout << A[i] << " ";
  }
  cout << endl;
}
int main() {
  int t, i, j, n, k, maxx, ind;
  cin >> n;
  int A[n][n];
  int cnt[n];
  vector<int> v(n);
  for (i = 0; i < n; i++) {
    memset(cnt, 0, sizeof(cnt));
    for (j = 0; j < n; j++) {
      cin >> A[i][j];
      cnt[A[i][j]]++;
    }
    maxx = 2, ind = -1;
    int cntt = 0;
    for (k = 0; k < n; k++) {
      if (cnt[k] >= maxx) {
        ++cntt;
        ind = k;
      }
    }
    if (cntt) {
      v[i] = ind;
    }
  }
  for (i = 0, j = n - 1; i < n; i++) {
    if (v[i] == 0) {
      v[i] = j++;
    }
    cout << v[i] << " ";
  }
  cout << endl;
  return 0;
}
