#include <bits/stdc++.h>
using namespace std;
long long us[20000], user[20000], i, n, k, j, a[60][60], kol, mx, t;
vector<long long> v;
int main() {
  cin >> n;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= n; j++) cin >> a[i][j];
  for (t = 1; t <= n; t++) {
    for (i = 1; i <= n; i++) {
      for (j = 1; j <= n; j++) {
        if (a[i][j] == t) kol++;
      }
      if (kol > mx) mx = kol, us[t] = i;
      kol = 0;
    }
    mx = 0;
    user[us[t]] = t;
  }
  for (i = 1; i <= n; i++)
    if (user[i] == 0)
      cout << n << " ";
    else
      cout << user[i] << " ";
  return 0;
}
