#include <bits/stdc++.h>
using namespace std;
long long suf(long long a) { return (a * (a + 1)) / 2; }
const long long OO = 1e6 + 10;
vector<vector<int> > adj;
int dx[]{1, -1, 0, 0};
int dy[]{0, 0, 1, -1};
int dx8[]{1, -1, 0, 0, 1, -1, 1, -1};
int dy8[]{0, 0, 1, -1, 1, -1, -1, 1};
int main() {
  int n;
  while (cin >> n) {
    int R[100][100];
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++) cin >> R[i][j];
    vector<int> ans(n);
    map<int, int> gen;
    for (int i = 0; i < n; i++) {
      map<int, int> mp;
      int rep = INT_MAX;
      for (int j = i + 1; j < n; j++) {
        mp[R[i][j]]++;
        if (mp[R[i][j]] > 1) rep = R[i][j];
      }
      if (rep != INT_MAX) ans[i] = rep, gen[rep]++;
      for (int k = i + 1; k < n; k++)
        if (R[i][k] != rep && gen[R[i][k]] == 0)
          ans[k] = R[i][k], gen[R[i][k]]++;
    }
    int last;
    for (int q = 1; q <= n; q++)
      if (gen[q] == 0) last = q;
    for (int i = 0; i < n; i++)
      if (ans[i] == 0)
        cout << last << " ";
      else
        cout << ans[i] << " ";
    cout << endl;
  }
  return 0;
}
