#include <bits/stdc++.h>
const int MNN = 2e3 + 1;
using namespace std;
int n, b[MNN][MNN], mx;
bool used[MNN];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      cin >> b[i][j];
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      mx = max(mx, b[i][j]);
    }
    if (used[mx] == 1) {
      cout << mx + 1 << ' ';
      used[mx + 1] = 1;
    } else {
      cout << mx << ' ';
      used[mx] = 1;
    }
    mx = 0;
  }
  return 0;
}
