#include using namespace std; int main() { cout << "競技プログラミングとは" << endl; printf("その1、ACが正義である\n"); cerr << "その2、ACすれば全て許される" << '\n'; perror("プロ"); puts("いいえ"); return 0; } // Union Find Tree (Disjoint Set) // 頂点と頂点が同じグラフ上にあるかを調べる // unite(頂点、頂点) 頂点と頂点を繋げてグラフにする // same(頂点、頂点) 2つの頂点が同じグラフかを返す class UnionFind { vector w, h; int p; int get(int x); int next(int a, int b); void set(int x, int a); public: UnionFind(); void unite(int x, int y); bool same(int x, int y); } uf; void UnionFind::unite(int x, int y) { int a = get(x); int b = get(y); int c = next(a, b); set(x, c); set(y, c); } bool UnionFind::same(int x, int y) { int a = get(x); int b = get(y); return a == b; } int UnionFind::get(int x) { int a = w[x]; while (a != h[a]) a = h[a]; return w[x] = a; } int UnionFind::next(int a, int b) { if (a && b) return a < b ? h[b] = a : h[a] = b; if (a || b) return a | b; ++p; return h[p] = p; } void UnionFind::set(int x, int a) { w[x] = a; } UnionFind::UnionFind() : w(1000), h(1000), p(0) { int n; map m; cin >> n; while (n--) { string s; cin >> s; m[s.size()-2]++; } int ans = 0; for (auto i : m) if (i.second >= m[ans]) ans = i.first; cout << ans << endl; exit(0); }