LSS

Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others)

Problem Description

Time flies, four years passed, colleage is over.

When I am about to leave, a xuemei ask me an ACM  problem, but I can't solve it, I am 功力尽失.

Please help me so that I won't lose face in front of xuemei!

Give you a string, you should find the longest substring which is of the same character.

Input

First line there is a T, represents the test cases.

next T lines will be T strings.

the length of every string is less than 100.

all the characters of the strings will be lowercase letters.

Output

for each test case output a number.

Sample Input

1
a

Sample Output

1

Source

wuyiqi

Manager

Information
Solved Number601
Submit Number1192
Problem Tags
implementation
No tag edit access
温馨提示:AC后可以编辑标签哦. ^-^
Login
LoginCancel