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