#include <bits/stdc++.h>
using namespace std;
int op[51];
int main() {
  int a, arr[51], list[51], index = 0, max, e = 0;
  cin >> a;
  for (int i = 0; i < a; i++) {
    for (int j = 0; j < a; j++) cin >> arr[j];
    sort(arr, arr + a);
    list[index] = arr[a - 1];
    op[list[index]]++;
    if (op[list[index]] == 2) max = list[index];
    index++;
  }
  for (int i = 0; i < a; i++) {
    if (list[i] == max && e == 0) {
      cout << list[i] + 1 << " ";
      e++;
    } else
      cout << list[i] << " ";
  }
  return 0;
}
