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