Little Arya loves to play with numbers. She likes to play in different ways with them. One day she started playing with numbers by bitwise OR operation. The game is that, she has N numbers. She will choose some random group of numbers from those N numbers. She will apply Bitwise OR operation between them and get a resultant number M.

Now, she wants to know the maximum value of M that she can find out from that arbitrary group of numbers after applying Bitwise OR operation.

Input

At first your program will take T as a test case (1 ≤ T ≤ 10). Then it will take input for each test case. First line of test case will take N (1 ≤ N ≤ 100). Next line has N numbers (0 ≤ Ni ≤ 106)

Output

At first print test case number just like sample output “Case X: ”, X is the test case number , with the maximum numbers M as described in the problem.