#include <bits/stdc++.h>
using namespace std;
const int max_N = 55;
int A[max_N][max_N];
int row_count[max_N][max_N];
int vis[max_N];
int ans[max_N];
int main() {
  int N;
  scanf("%d", &N);
  for (int i = 1; i <= N; ++i)
    for (int j = 1; j <= N; ++j) {
      scanf("%d", &A[i][j]);
      if (A[i][j] != 0) row_count[i][A[i][j]]++;
    }
  for (int i = 1; i < N; ++i) {
    int j, best = 1;
    for (j = 1; j <= N; ++j)
      if (row_count[j][i] > row_count[best][i]) best = j;
    assert(!vis[best]);
    vis[best] = 1;
    ans[best] = i;
  }
  for (int i = 1; i <= N; ++i)
    if (!vis[i]) {
      ans[i] = N;
      break;
    }
  for (int i = 1; i <= N; ++i) printf("%d ", ans[i]);
}
