#include <bits/stdc++.h>
using namespace std;
int a[60][60];
bool check[60];
int main() {
  int n, x;
  cin >> n;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) cin >> a[i][j];
  for (int i = 0; i < n; i++) {
    int t = 0;
    for (int j = 0; j < n; j++) check[a[i][j]] = true;
    for (int j = 1; j <= n; j++)
      if (check[j] == true) t++;
    if (t == n - 1) {
      x = i;
      break;
    }
  }
  for (int i = 0; i < n; i++) {
    if (a[x][i] == 0)
      cout << n << " ";
    else
      cout << a[x][i] << " ";
  }
  cout << endl;
  return 0;
}
