#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int mat[51][51] = {0};
int main() {
  int n;
  cin >> n;
  int row;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> mat[i][j];
      if (mat[i][j] == n - 1) row = i;
    }
  }
  for (int i = 0; i < n; i++) {
    cout << (mat[row][i] == 0 ? n : mat[row][i]) << " ";
  }
  return 0;
}
