Nancy, the leader of a group, always participates in many different kinds of competitions. One day, she decides to choose some of her group members to take part in an important game. In order to win, she has to make sure that each two person chosen could get along well with each other. In this sense, she wants to choose the biggest sub group from this group. And how many people could be contained in the biggest group.
The first line is a number T which refers to the test cases.
For each case, the first line is an integer n (0<n<50), which represent the number of person in the group.
Then follow n lines, each line contains n intergers,1 or 0.The jth integer in ith line represent the relationship between the ith and the jth person.1 represent they can get well long with each other, otherwise 0. And we will make sure that the jth integer in ith line is the same with the ith integer in jth line. And the ith integer in ith line is 1.
Output the number of biggest sub group. And one line for each case