#include <bits/stdc++.h>
using namespace std;
bool Active(long long val, long long pos) { return (val >> pos) & 1 ? 1 : 0; }
signed main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  long long n;
  cin >> n;
  long long a[n + 1][n + 1], ans[n + 1];
  memset(ans, 0, sizeof(ans));
  set<long long> xx;
  long long pos = 1;
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j <= n; j++) {
      cin >> a[i][j];
    }
  }
  for (long long k = 1; k < n; k++) {
    for (long long i = 1; i <= n; i++) {
      long long cnt = 0;
      for (long long j = 1; j <= n; j++) {
        if (a[i][j] == k) cnt++;
      }
      if (cnt == n - k) pos = i;
    }
    ans[pos] = k;
  }
  for (long long i = 1; i <= n; i++) {
    if (ans[i])
      cout << ans[i] << ' ';
    else
      cout << n << ' ';
  }
}
