#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e6 + 10;
int a[MAX_N];
int res;
const int BUFSIZE = 1000000;
char buf[BUFSIZE + 1];
string nextString() {
  scanf("%s", buf);
  return buf;
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < (n); ++i) {
    set<int> s;
    for (int j = 0; j < (n); ++j) {
      cin >> a[j];
      s.insert(a[j]);
    }
    if (s.size() == n) {
      for (int k = 0; k < (n); ++k) cout << (a[k] == 0 ? n : a[k]) << " ";
      cout << endl;
      return 0;
    }
  }
  return 0;
}
