#include <bits/stdc++.h>
using namespace std;
int n, a[55][55], tmp[55], c;
bool mark[55][55];
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j) {
      cin >> c;
      a[i][j] = c;
      if (!mark[i][c] && c != 0) {
        ++tmp[i];
        mark[i][c] = 1;
      }
    }
  for (int i = 0; i < n; ++i)
    if (tmp[i] == n - 1) {
      tmp[i] = n;
      break;
    }
  for (int i = 0; i < n; ++i) cout << tmp[i] << ' ';
}
