1947 最长串


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

LEO想确定最长字串的长度,他希望用编程的方法来找到这个长度。

Input

多组数据,每组数据由一个整数N引导,后面给出N个字串(字串中不含空格,字串最大长度不超过100)。当N=0时结束。

Output

对于每组数据,输出一行最长字串的长度。

Sample

Input

3
aaaaaaaaaa  aaaa  aaa
0

Output

10

Source: qn


Comments

There are no comments at the moment.