#include #include #include #include using namespace std; int main() { int n; vector array; cin >> n; array.resize(1001,0); string str; int count=0; for (int i = 0;i < n;i++) { count = 0; cin >> str; for (int j = 0;j < str.size();j++) { if (str[j] == '^')count++; } array[count]++; } int maxa = 0; for (int i = 1;i <= array.size() - 2;i++) { if (array[i+1]!=0 && array[i] <= array[i + 1]) { if (array[maxa]<=array[i+1]) { maxa = i + 1; } } } cout << maxa << endl; return 0; }