#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10, OO = 0x3f3f3f3f;
const int mod = 1e9 + 7;
int a[60][60];
int ans[60];
bool done[60];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      scanf("%d", &a[i][j]);
    }
  }
  for (int i = 1; i <= n; i++) {
    done[i] = false;
  }
  for (int x = 1; x <= n; x++) {
    for (int i = 1; i <= n; i++) {
      if (done[i]) continue;
      bool good = true;
      for (int j = 1; j <= n; j++) {
        good = good && (a[i][j] <= x);
      }
      if (good) {
        ans[i] = x;
        done[i] = true;
        break;
      }
    }
  }
  for (int i = 1; i <= n; ++i) printf("%d ", ans[i]);
  puts("");
  return 0;
}
