#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { int32_t n; cin >> n; unordered_map hist; for (auto i = 0; i < n; ++i) { string s; cin >> s; int32_t cnt = 0; for (auto c : s) { if (c == '^') ++cnt; } ++hist[cnt]; } vector> xs; for (auto &&p : hist) { xs.push_back({p.second, p.first}); } sort(xs.rbegin(), xs.rend()); cout << xs[0].second << endl; return 0; }