#include <bits/stdc++.h>
const long long MAXN = 58;
long long a[MAXN][MAXN];
long long ans[MAXN];
bool done[MAXN];
using namespace std;
int main() {
  long long n;
  scanf("%lld", &n);
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j <= n; j++) {
      scanf("%lld", &a[i][j]);
    }
  }
  for (long long i = 1; i <= n; i++) {
    done[i] = false;
  }
  for (long long x = 1; x <= n; x++) {
    for (long long i = 1; i <= n; i++) {
      if (done[i]) continue;
      bool good = true;
      for (long long j = 1; j <= n; j++) {
        good = good && (a[i][j] <= x);
      }
      if (good) {
        ans[i] = x;
        done[i] = true;
        break;
      }
    }
  }
  set<long long> seen;
  for (long long i = 1; i <= n; i++) {
    assert(1 <= ans[i] <= n);
    seen.insert(ans[i]);
  }
  assert(seen.size() == n);
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j <= n; j++) {
      if (i == j) continue;
      assert(a[i][j] == min(ans[i], ans[j]));
    }
  }
  for (long long i = 1; i <= n; i++) {
    printf("%lld ", ans[i]);
  }
  printf("\n");
}
