#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-6;
const long long mod = 1e9 + 7;
const double pi = acos(-1.0);
const int MAXN = 201000;
const int MAXM = 299900;
const int N = 1e5 + 5;
bool a[55];
int main() {
  int n;
  while (~scanf("%d", &n)) {
    memset(a, 0, sizeof(a));
    bool flag = 0;
    for (int i = 0; i < n; i++) {
      int maxn = 0;
      for (int j = 0; j < n; j++) {
        int x;
        scanf("%d", &x);
        maxn = max(maxn, x);
      }
      if (flag) putchar(' ');
      while (a[maxn]) maxn++;
      printf("%d", maxn);
      a[maxn] = 1;
      flag = 1;
    }
  }
  return 0;
}
