#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> p(55);
  int n, a[55][55];
  cin >> n;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j) cin >> a[i][j];
  for (int x = 1; x <= n - 1; ++x) {
    int pos = 0;
    for (int i = 0; i < n; ++i) {
      pos = i;
      int cnt = 0;
      for (int j = 0; j < n; ++j) {
        if (a[i][j] == 0) {
          ++cnt;
          continue;
        }
        if (a[i][j] != x) {
          pos = -1;
          break;
        }
      }
      if (pos != -1 && cnt != n) {
        p[pos] = x;
        break;
      }
    }
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < n; ++j)
        if (a[i][j] == x) a[i][j] = 0;
    }
  }
  for (int i = 0; i < n; ++i) {
    if (p[i] == 0) p[i] = n;
    cout << p[i] << ' ';
  }
  return 0;
}
