Gru and Lucy are breaking into El Macho's lair. In front of them is a hallway that may be booby-trapped. The hallway is a single row of squares, and every square is marked either X or O. Gru believes that only the squares in the longest run of consecutive X marks are safe.
For each hallway, count how many squares are safe.
The first line contains the number of test cases T. T is less than 100.
Each of the following lines holds one test case. The first number on the line is the number of squares n, followed by n strings separated by spaces. Each string is either X or O.
n is at least 1, and the sum of n over all test cases is at most 200000.
For each test case, find the length L of the longest run of consecutive X marks and print one line in this format.
The longest contiguous subsequence of X's is of length L
Write L as a plain integer. If the hallway has no X at all, L is 0.