#include <bits/stdc++.h>
using namespace std;
int n;
int a[51][51], res[51];
int R[51][51], C[51][51];
bool T[51];
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j) {
      cin >> a[i][j];
      ++R[i][a[i][j]];
      ++C[j][a[i][j]];
    }
  for (int i = 1; i <= n; ++i) {
    for (int r = 1; r <= n; ++r) {
      if (R[r][i] == n - i && C[r][i] == n - i && !T[r]) {
        res[r] = i;
        T[r] = 1;
        break;
      }
    }
  }
  for (int i = 1; i <= n; ++i) cout << res[i] << " ";
  cin >> n;
}
