In the ruined observatory above the dead city, Racso and Christian copy out the Ledger of True Names.
A true name is power: speak one and the thing it belongs to must answer. But a name spoken alone burns the speaker, so the old sorcerers bound names in pairs, sealing each pair under a single sigil. The binding holds only if the two names begin the same way, and the sigil's power is exactly the length of that shared beginning.
The brothers have $$$N$$$ true names before them and one night of candlelight. Find the power of the strongest sigil they can seal — the longest beginning shared by two different names in the Ledger.
The first line contains a single integer $$$N$$$ $$$(2 \le N \le 10^5)$$$ — the number of true names in the Ledger.
Each of the next $$$N$$$ lines contains one true name $$$s_i$$$, a non-empty string of lowercase Latin letters with $$$|s_i| \le 50$$$.
It is guaranteed that the sum of $$$|s_i|$$$ over all names does not exceed $$$10^5$$$. Names are not necessarily distinct.
Print a single integer: the power of the strongest sigil, or $$$0$$$ if no two names in the Ledger even begin with the same letter.
5racsorascalchristianchristchris
6
3umbraumbrasol
5
Two names $$$s$$$ and $$$t$$$ share a beginning of length $$$\ell$$$ if $$$s_1 = t_1$$$, $$$s_2 = t_2$$$, $$$\ldots$$$, $$$s_\ell = t_\ell$$$.
Two entries of the Ledger are always considered different if they sit at different positions in the input, even when their names are identical: two entries reading umbra share a beginning of length $$$5$$$.
| Name |
|---|


