func_code_string: #include <bits/stdc++.h>   #pragma comment(linker,  /STACK:64000000 )   using namespace std;   int a[1100][1100], pt[1100], b[] = {25, 18, 15, 12, 10, 8, 6, 4, 2, 1}, ef, n;   map<string, int> m;   string st[1100];   int f(int aa, int bb) {     if (pt[aa] != pt[bb])       return pt[aa] > pt[bb];     else {       for (int i = 0; i < 60; i++)         if (a[aa][i] != a[bb][i]) return a[aa][i] > a[bb][i];       return 0;     }   }   int f2(int aa, int bb) {     if (a[aa][0] != a[bb][0])       return a[aa][0] > a[bb][0];     else       return f(aa, bb);   }   int main() {     int t;     cin >> t;     for (int ii = 0; ii < t; ii++) {       cin >> n;       for (int i = 0; i < n; i++) {         string s;         cin >> s;         if (m.find(s) == m.end()) {           m[s] = ef++;           st[ef - 1] = s;         }         a[m[s]][i]++;         if (i <= 9) pt[m[s]] += b[i];       }     }     int r[1100];     for (int i = 0; i < m.size(); i++) r[i] = i;     sort(r, r + m.size(), f);     cout << st[r[0]] << endl;     sort(r, r + m.size(), f2);     cout << st[r[0]] << endl;   }   