#include <bits/stdc++.h>
using namespace std;
int main() {
  int fin[50];
  int arr[50][50];
  int check[50];
  int n, tempI = -1, tempJ = -1;
  cin >> n;
  for (int i = 0; i < n; i++) {
    fin[i] = 0;
    check[i] = -1;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> arr[i][j];
    }
  }
  for (int k = 1; k <= n; k++) {
    tempI = -1;
    tempJ = -1;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (arr[i][j] == k && (tempI == -1 && tempJ == -1)) {
          tempI = i;
          tempJ = j;
        } else if (arr[i][j] == k && (tempI != i || tempJ != j) &&
                   (tempI != -1 && tempJ != -1)) {
          if (tempI == i)
            fin[i] = k;
          else if (tempJ == j)
            fin[j] = k;
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (fin[i] != 0) check[fin[i] - 1] = 0;
  }
  for (int i = 0; i < n; i++) {
    if (check[i] == -1) {
      int j;
      for (j = 0; fin[j] != 0; j++)
        ;
      fin[j] = i + 1;
    }
  }
  for (int i = 0; i < n - 1; i++) {
    cout << fin[i] << " ";
  }
  cout << fin[n - 1];
  return 0;
}
