#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
int n;
bool flag;
int main(int argc, char const *argv[]) {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    int ans = 0;
    for (int j = 0; j < n; ++j) {
      int x;
      scanf("%d", &x);
      ans = max(ans, x);
    }
    if (ans == n - 1 && !flag) {
      ans = n;
      flag = true;
    }
    printf("%d ", ans);
  }
  return 0;
}
