#include <bits/stdc++.h>
const double PI = acos(-1.0);
const double e = exp(1.0);
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
using namespace std;
int n;
int ans[55];
int mp[55][55];
int flag[55];
int main() {
  int q;
  while (~scanf("%d", &n)) {
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= n; j++) scanf("%d", &mp[i][j]);
    memset(ans, 0, sizeof(ans));
    memset(flag, 0, sizeof(flag));
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= n; j++)
        for (int k = 1; k <= n && k != j; k++)
          if (mp[i][j] == mp[i][k] && j != i && k != i) {
            ans[i] = mp[i][j];
            flag[ans[i]] = 1;
          }
    int numm = 100;
    while (numm--) {
      for (int i = 1; i <= n; i++)
        for (int j = 1; j <= n; j++) {
          if (ans[i] != 0) {
            if (mp[i][j] != ans[i] && j != i) {
              if (!ans[j]) ans[j] = mp[i][j];
              flag[ans[j]] = 1;
            }
          } else if (!ans[i]) {
            if (j != i && ans[j] && mp[i][j] != ans[j]) {
              if (!ans[i]) ans[i] = mp[i][j];
              flag[ans[i]] = 1;
            }
          }
        }
    }
    for (int i = 1; i <= n; i++) {
      if (ans[i] > 0) {
        printf("%d ", ans[i]);
      } else {
        for (int j = 1; j <= n; j++)
          if (!flag[j]) {
            printf("%d ", j);
            flag[j] = 1;
            break;
          }
      }
    }
    printf("\n");
  }
  return 0;
}
