#include <bits/stdc++.h>
using namespace std;
const int maxn = 505;
long long a[maxn];
int main() {
  int n;
  long long x;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) a[i] = 1LL;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      scanf("%I64d", &x);
      if (i == j) a[i] = x;
    }
  }
  for (int i = 1; i <= n; i++) printf("%I64d%c", a[i], i == n ? '\n' : ' ');
  return 0;
}
