#include <bits/stdc++.h>
using namespace std;
template <typename T, size_t n>
void show_arr(T const (&arr)[n]) {
  cout << "The array elements are : ";
  for (size_t i = 0; i < n; i++) cout << arr[i] << ' ';
  cout << "\n";
}
void show_vec(std::vector<int> const &a) {
  cout << "The vector elements are : ";
  for (int i = 0; i < a.size(); i++) cout << a.at(i) << ' ';
  cout << "\n";
}
int main() {
  int n, x, mx;
  cin >> n;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    mx = 0;
    for (int j = 0; j < n; j++) {
      cin >> x;
      mx = max(mx, x);
    }
    v.push_back(mx);
  }
  bool flag = false;
  for (int i = 0; i < n; i++) {
    if (v[i] == n - 1 and !flag) {
      flag = true;
      cout << n << ' ';
    } else
      cout << v[i] << ' ';
  }
  return 0;
}
