You have been walking in the woods for hours, and you want to go home.
The woods contain N clearings labeled 1, 2, ..., N. You are now at clearing 1, and you must reach clearing N in order to leave the woods. Each clearing from 1 to N1 has a left path and a right path leading out to other clearings, as well as some number of oneway paths leading in. Unfortunately, the woods are haunted, and any time you enter a clearing, one of the two outgoing paths will be blocked by shifty trees. More precisely, on your k^{th} visit to any single clearing:
You begin at clearing #1, and when you get to clearing #N, you can leave the woods. How many paths do you need to follow before you get out?
The first line of the input gives the number of test cases, T. T test cases follow, each beginning with a line containing a single integer N.
N1 lines follow, each containing two integers L_{i} and R_{i}. Here, L_{i} represents the clearing you would end up at if you follow the left path out of clearing i, and R_{i} represents the clearing you would end up at if you follow the right path out of clearing i.
No paths are specified for clearing N because once you get there, you are finished.
For each test case, output one line containing "Case #x: y", where x is the case number (starting from 1) and y is the number of paths you need to follow to get to clearing N. If you will never get to clearing N, output "Infinity" instead.
1 ≤ T ≤ 30.
1 ≤ L_{i}, R_{i} ≤ N for all i.
2 ≤ N ≤ 10.
2 ≤ N ≤ 40.
Input 
Output 
2

Case #1: 8

In the first sample case, your route through the woods will be as shown below:
Paths followed  Clearing  Path direction 
0  1  Left 
1  2  Left 
2  3  Left 
3  2  Right 
4  1  Right 
5  1  Left 
6  2  Left 
7  3  Right 
8  4   
Points  Correct  Attempted 

5pt  25  25 
46pt  0  4 