#include #include #include #include #include #include #include #include #include #include #include #include #define vll vector #define vvvl vector #define vvl vector> #define VV(a, b, c, d) vector>(a, vector(b, c)) #define VVV(a, b, c, d) vector(a, vvl(b, vll (c, d))); #define re(c, b) for(ll c=0;c> n; vll cnt(1000, 0); re(i, n){ string s; std::cin >> s; ll t = 0; for(auto c:s) if(c=='^') t++; cnt[t]++; } ll ans = 0, idx = -1; for(int i=0;i<1000;i++) if(ans<=cnt[i]) ans = cnt[i], idx = i; std::cout << idx << '\n'; }