#include <bits/stdc++.h>
using namespace std;
int a[52][52] = {0};
int b[52];
bool c[52] = {0};
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      scanf("%d", &a[i][j]);
      if (c[a[i][j]] == 0)
        c[a[i][j]] = 1;
      else
        b[i] = a[i][j];
    }
    memset(c, 0, sizeof(c));
  }
  for (int i = 1; i <= n; i++) c[b[i]] = 1;
  for (int i = 1; i <= n; i++) {
    if (b[i])
      cout << b[i];
    else {
      for (int j = 1; j <= n; j++)
        if (c[j] == 0) {
          cout << j;
          c[j] = 1;
          break;
        }
    }
    cout << " ";
  }
  return 0;
}
