#include <bits/stdc++.h>
using namespace std;
int a[555][555], ans[555], num[555];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      cin >> a[i][j];
    }
  }
  for (int i = 1; i <= n; ++i) ans[i] = 0;
  for (int i = 1; i <= n; ++i) num[i] = 0;
  for (int i = 1; i < n; ++i) {
    for (int row = 1; row <= n; ++row) {
      bool ok = true;
      int cnt = 0;
      for (int column = 1; column <= n; ++column) {
        if (a[row][column] == 0) continue;
        if (a[row][column] != i) ok = false;
        ++cnt;
      }
      if (ok && cnt > 0) {
        ans[row] = i;
        for (int j = 1; j <= n; ++j) a[row][j] = 0, a[j][row] = 0;
        break;
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    if (ans[i] == 0) ans[i] = n;
  }
  for (int i = 1; i <= n; ++i) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
