#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[100][100], b[1000], s = 0, max = 0, z[100], k = 0, g = 0, f = 0,
                               max1 = 0;
  cin >> n;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) cin >> a[i][j];
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (a[i][j] > max1) max1 = a[i][j];
      s = s + a[i][j];
    }
    if (s == (max1 * (max1 + 1) / 2)) {
      k = i;
      break;
    }
    s = 0;
  }
  for (int i = 1; i <= n; i++) {
    if (a[k][i] == 0) g = i;
    if (a[k][i] > max) max = a[k][i];
  }
  a[k][g] = max + 1;
  for (int i = 1; i <= n; i++) cout << a[k][i] << ' ';
  return 0;
}
