#include <bits/stdc++.h>
using namespace std;
int n, m[100][100], ans[100], flag[100];
int main() {
  int i, j;
  cin >> n;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= n; j++) cin >> m[i][j];
  for (i = 1; i <= n; i++) ans[i] = -999999999;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= n; j++)
      if (i != j) ans[i] = max(ans[i], m[i][j]);
  for (i = 1; i <= n; i++)
    if (ans[i] == n - 1) {
      ans[i] = n;
      break;
    }
  for (i = 1; i <= n; i++) {
    if (i - 1) cout << ' ';
    cout << ans[i];
  }
  cout << endl;
  return 0;
}
