#include <bits/stdc++.h>
using namespace std;
const int maxn = 55;
int a[maxn][maxn];
int mx[maxn], mv[maxn];
bool visit[maxn];
int b[maxn], d[maxn];
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 1; i < n + 1; ++i)
    for (int j = 1; j < n + 1; ++j) cin >> a[i][j];
  for (int i = 1; i < n + 1; ++i) b[i] = n;
  for (int i = 1; i < n + 1; ++i) {
    memset(d, 0, sizeof(d));
    for (int j = 1; j < n + 1; ++j) d[a[i][j]]++;
    mx[i] = 0;
    mv[i] = 0;
    for (int j = n + 1 - 1; j >= 1; --j) {
      if (d[j] > mx[i]) {
        mx[i] = d[j];
        mv[i] = j;
      }
    }
  }
  for (int i = 1; i < n; ++i) {
    int v = 0;
    for (int j = 1; j < n + 1; ++j) {
      if (!visit[j] && mx[j] > mx[v]) v = j;
    }
    visit[v] = true;
    b[v] = mv[v];
  }
  for (int i = 1; i < n + 1; ++i) printf("%d ", b[i]);
  putchar('\n');
  return 0;
}
