SP287 NETADMIN - Smart Network Administrator

Description

The citizens of a small village are tired of being the only inhabitants around without a connection to the Internet. After nominating the future network administrator, his house was connected to the global network. All users that want to have access to the Internet must be connected directly to the admin's house by a single cable (every cable may run underground along streets only, from the admin's house to the user's house). Since the newly appointed administrator wants to have everything under control, he demands that cables of different colors should be used. Moreover, to make troubleshooting easier, he requires that no two cables of the same color go along one stretch of street. Your goal is to find the minimum number of cable colors that must be used in order to connect every willing person to the Internet.

Input Format

_t_ \[the number of test cases, t

Output Format

For each test case print the minimal number of cable colors necessary to make all the required connections.