#include <bits/stdc++.h>
using namespace std;
const int IINF = INT_MAX;
struct Data {
  int i, j, v;
  bool operator<(const Data &data) const {
    if (v != data.v) return v < data.v;
    if (i != data.i) return i < data.i;
    return j < data.j;
  }
};
int n, arr[100][100];
bool check(vector<int> vec) {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i == j) continue;
      if (min(vec[i], vec[j]) != arr[i][j]) return false;
    }
  }
  return true;
}
int main() {
  priority_queue<Data> Q;
  cin >> n;
  vector<int> ans(n, IINF);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> arr[i][j];
    }
  }
  for (int _ = 0; _ < n; _++) {
    int mini = -1;
    int v = IINF;
    for (int i = 0; i < n; i++)
      if (ans[i] == IINF) {
        bool same = true;
        int tmpv = -1;
        for (int j = 0; j < n; j++)
          if (i != j && ans[j] == IINF) {
            if (tmpv == -1)
              tmpv = arr[i][j];
            else {
              if (tmpv != arr[i][j]) {
                same = false;
                break;
              }
            }
          }
        if (!same) continue;
        if (tmpv == -1) tmpv = IINF;
        if (mini == -1) {
          mini = i;
          v = tmpv;
          continue;
        }
        if (mini > tmpv) {
          mini = i;
          v = tmpv;
        }
      }
    ans[mini] = v;
  }
  vector<int> ok(n + 1, 0);
  for (int i = 0; i < (int)ans.size(); i++) {
    if (ans[i] != IINF) {
      ok[ans[i]] = 1;
    }
  }
  int remain = -1;
  for (int i = 0; i < n; i++) {
    if (ok[i + 1] == 0) {
      remain = i + 1;
      break;
    }
  }
  for (int i = 0; i < n; i++) {
    if (ans[i] == IINF) {
      ans[i] = remain;
      break;
    }
  }
  for (int i = 0; i < (int)ans.size(); i++) {
    if (i) printf(" ");
    cout << ans[i];
  }
  puts("");
  return 0;
}
