#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  int g[n + 1][n + 1];
  memset(g, 0, sizeof(g));
  int vis[n + 1];
  int ans[n];
  memset(vis, 0, sizeof(vis));
  memset(ans, 0, sizeof(ans));
  for (int i = 0; i < n; i += 1) {
    for (int j = 0; j < n; j += 1) {
      int r;
      cin >> r;
      g[i][r]++;
    }
    int maxi = 0;
    int ans1 = 0;
    for (int j = 1; j < n + 1; j += 1) {
      if (maxi < g[i][j]) {
        maxi = g[i][j];
        ans1 = j;
      }
    }
    if (maxi > 1) {
      ans[i] = ans1;
      vis[ans1] = 1;
    }
  }
  int j = 1;
  for (int i = 0; i < n; i += 1) {
    if (ans[i] == 0) {
      for (; j <= n; j++)
        if (vis[j] == 0) break;
      ans[i] = j;
      vis[j] = 1;
    }
  }
  for (int i = 0; i < n; i += 1) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
