#include <bits/stdc++.h>
using namespace std;
int n;
int arr[55][55];
int answer[55];
bool check() {
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (min(answer[i], answer[j]) != arr[i][j]) return false;
    }
  }
  return true;
}
int main() {
  map<int, int> m;
  cin >> n;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> arr[i][j];
    }
    answer[i] = i + 1;
    m[i + 1] = 1;
  }
  bool flag;
  while (true) {
    flag = true;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (i == j) continue;
        if (min(answer[i], answer[j]) != arr[i][j]) {
          int temp = m[arr[i][j]];
          swap(answer[i], answer[temp]);
          m[answer[i]] = i;
          m[answer[temp]] = temp;
          flag = false;
        }
      }
    }
    if (flag) break;
  }
  for (int i = 0; i < n; i++) cout << answer[i] << " ";
}
