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