#include <bits/stdc++.h>
using namespace std;
int n, a[51], cn, pasuxi[51], b;
int main() {
  cin >> n;
  for (int k = 1; k <= n; k++) {
    for (int i = 1; i <= n; i++) {
      cin >> b;
      a[b]++;
    }
    for (int i = 1; i <= n; i++) {
      if (a[i] > 1) {
        pasuxi[k] = i;
        break;
      }
    }
    for (int i = 1; i <= n; i++) {
      a[i] = 0;
    }
    if (pasuxi[k] == 0) {
      pasuxi[k] = n - cn;
      cn = 1;
    }
  }
  for (int k = 1; k <= n; k++) {
    cout << pasuxi[k] << " ";
  }
  return 0;
}
