#include <bits/stdc++.h>
using namespace std;
int getInt() {
  int x;
  scanf("%d", &x);
  return x;
}
long long getLongLong() {
  long long x;
  scanf("%I64d", &x);
  return x;
}
double getDouble() {
  double x;
  scanf("%lf", &x);
  return x;
}
char getChar() {
  char x;
  scanf("%c", &x);
  return x;
}
template <typename t>
t abs(t a) {
  if (a >= 0) return a;
  return -a;
}
struct dual {
  int a, b;
  bool const operator<(const dual &x) const {
    if (a == x.a) return b > x.b;
    return a < x.a;
  }
};
struct triple {
  int a, b, c;
  bool const operator<(const triple &x) const {
    if (c == x.c) {
      if (a == x.a) return b > x.b;
      return a < x.a;
    }
    return c < x.c;
  }
};
void FastIO() {
  ios::sync_with_stdio(0);
  cin.tie(0);
}
long long a[100][100], v;
int main() {
  FastIO();
  int n;
  cin >> n;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) cin >> a[i][j];
  map<long long, int> mp;
  for (int i = 0; i < n; i++) {
    v = *max_element(a[i], a[i] + n);
    a[i][i] = v;
    mp[v]++;
  }
  for (int i = 0; i < n; i++) {
    v = a[i][i];
    if (mp[v] == 1) continue;
    while (mp.find(v) != mp.end()) v++;
    mp[v]++;
    mp[a[i][i]]--;
    a[i][i] = v;
  }
  for (int i = 0; i < n; i++) cout << a[i][i] << " ";
  cout << endl;
  return 0;
}
