#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, i, j, mx = 0, s;
  cin >> n;
  long long int a[n][n];
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      cin >> a[i][j];
      if (mx < a[i][j]) {
        mx = a[i][j];
        s = i;
      }
    }
  }
  for (i = 0; i < n; i++) {
    if (a[s][i] != 0) {
      cout << a[s][i] << " ";
    } else {
      cout << mx + 1 << " ";
    }
  }
}
