#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> anw(n);
  int e = n;
  for (int i = 0; i < n; i++) {
    vector<bool> vis(n);
    int pos = 0;
    int val = e;
    for (int j = 0; j < n; j++) {
      int t;
      cin >> t;
      if (t == 0) pos = j;
      if (vis[t]) val = t;
      vis[t] = true;
    }
    anw[pos] = val;
    if (val == n) e--;
  }
  for (int i = 0; i < n; i++) {
    if (i != 0) cout << " ";
    cout << anw[i];
  }
  cout << endl;
}
