#include <bits/stdc++.h>
using namespace std;
int32_t answer[50];
int main() {
  int32_t n;
  int32_t a[50][50];
  cin >> n;
  for (int32_t index = 0; index < n; index++) {
    for (int32_t index2 = 0; index2 < n; index2++) {
      cin >> a[index][index2];
    }
  }
  for (int32_t index0 = 1; index0 < n; index0++) {
    int32_t index, index2;
    for (index = 0; index < n; index++) {
      bool skip = true;
      for (index2 = 0; index2 < n; index2++) {
        if (!a[index][index2]) continue;
        if (a[index][index2] != index0) break;
        skip = false;
      }
      if (skip) continue;
      if (index2 >= n) break;
    }
    for (int32_t index3 = 0; index3 < n; index3++) {
      a[index][index3] = 0;
      a[index3][index] = 0;
    }
    answer[index] = index0;
  }
  for (int32_t index = 0; index < n; index++) {
    if (!answer[index]) answer[index] = n;
  }
  for (int32_t index = 0; index < n; index++) {
    cout << answer[index] << " ";
  }
  cout << endl;
  return 0;
}
