Miracle Corporations has a number of system services running in a distributed computer system, which is a prime target for hackers. The system consists of computer nodes, and each node runs an identical set of services. A hacker can destroy a service by running a specialized exploit for that service on all the nodes.
One day, a smart hacker collects the necessary exploits for all of these services and launches an attack. He discovers a security hole that gives just enough time to run a single exploit on each computer. These exploits successfully infect the computer where they are run and all of its neighboring computers.
Given a description of the network, determine the maximum number of services that the hacker can damage.
There will be multiple test cases in the input file. Each test case begins with an integer (1 \leq N \leq 16), the number of nodes in the network. The nodes are numbered from to N - 1. Each of the following lines describes the neighbors of a node. Line (0 \leq i < N) represents node . The description for node starts with an integer (the number of neighbors of node ), followed by integers in the range to N - 1, each denoting a neighbor of node .
The end of input is denoted by a case with N = 0. This case should not be processed.
For each test case, print a line in the format "Case : ", where is the case number and is the maximum possible number of services that can be damaged.
Example 1