#include <bits/stdc++.h>
using namespace std;
int M[60][60];
bool P[60];
int R[60];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  while (cin >> n) {
    for (int i = 0; i < n; i++) {
      P[i] = 1;
      R[i] = -1;
      for (int j = 0; j < n; j++) cin >> M[i][j];
    }
    for (int first = 1; first <= n; first++) {
      for (int i = 0; i < n; i++) {
        bool sw = P[i];
        for (int j = 0; j < n; j++) {
          if (P[i] and P[j])
            if (M[i][j] != first and M[i][j] != 0) sw = 0;
        }
        if (sw) {
          R[i] = first;
          P[i] = 0;
          break;
        }
      }
    }
    for (int i = 0; i < n; i++) cout << R[i] << " ";
    cout << "\n";
  }
  return 0;
}
