#include using namespace std; int main(){ map mp; int cnt = 0, N, i, j, max = 0, i_cnt; string str; cin >> N; for(i = 0; i < N; i++){ cin >> str; for(j = 0; j < str.size(); j++){ if(str[j] == '^') cnt++; } mp[cnt]++; cnt = 0; } for(auto itr = mp.begin(); itr != mp.end(); itr++){ if(max <= itr->second){ max = itr->second; i_cnt = itr->first; } } cout << i_cnt << endl; return 0; }