#include <bits/stdc++.h>
using namespace std;
const int maxn = 50 + 1;
int mn[maxn][maxn], Hash[maxn][maxn], res[maxn];
bool used[maxn];
bool dfs(int N) {
  bool ok = true;
  for (int a = 1; a <= N; ++a) {
    if (res[a] == 0) {
      ok = false;
      break;
    }
  }
  if (ok) return true;
  for (int a = 1; a <= N; ++a) {
    if (res[a]) continue;
    for (int b = 1; b <= N; ++b) {
      if (used[b] && Hash[a][b] > 0) continue;
      used[b] = true;
      res[a] = b;
      if (dfs(N)) return true;
      used[b] = false;
      res[a] = 0;
    }
  }
  return false;
}
int main() {
  int N;
  cin >> N;
  for (int a = 1; a <= N; ++a) fill(Hash[a], Hash[a] + maxn, 0);
  fill(res, res + maxn, 0);
  fill(used, used + maxn, false);
  for (int a = 1; a <= N; ++a) {
    for (int b = 1; b <= N; ++b) {
      cin >> mn[a][b];
      if (a != b && a < b) {
        Hash[a][mn[a][b]] += 1;
        if (Hash[a][mn[a][b]] >= 2) {
          res[a] = mn[a][b];
          used[mn[a][b]] = true;
        }
        Hash[b][mn[a][b]] += 1;
        if (Hash[b][mn[a][b]] >= 2) {
          res[b] = mn[a][b];
          used[mn[a][b]] = true;
        }
      }
    }
  }
  dfs(N);
  for (int a = 1; a <= N; ++a) {
    cout << res[a] << (a == N ? '\n' : ' ');
  }
  return 0;
}
