#include <bits/stdc++.h>
using namespace std;
int n, a[100][100];
bool u;
int rs[100];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) cin >> a[i][j];
  for (int x = 1; x <= n; x++) {
    for (int i = 1; i <= n; i++) {
      if (rs[i]) continue;
      u = 1;
      for (int j = 1; j <= n; j++) {
        if (a[i][j] > x) {
          u = 0;
          break;
        }
      }
      if (u) {
        rs[i] = x;
        break;
      }
    }
  }
  for (int i = 1; i <= n; i++) cout << rs[i] << " ";
  return 0;
}
