#include <bits/stdc++.h>   using namespace std;   int main() {     int n;     cin >> n;     int ans[52];     memset(ans, 0, sizeof(ans));     int flag = 0;     for (int i = 0; i < n; ++i) {       int arr[52];       memset(arr, 0, sizeof(arr));       for (int j = 0; j < n; ++j) {         int k;         cin >> k;         arr[k]++;       }       for (int j = 0; j < n; ++j) {         if (arr[j] == n - j) {           ans[i] = j;           if (j == n - 1) {             ans[i] += flag;             flag++;           }           break;         }       }     }     for (int i = 0; i < n; ++i) {       if (ans[i] == 0) ans[i] = n;       cout << ans[i] <<    ;     }   }   