beecrowd | 1590
# Cuarenta and Two

**Timelimit: 1**

By Bruno Adami, Universidade de São Paulo - São Carlos Brazil

Given a list of N integers, choose K or more numbers such that the binary *AND *of them all is maximum. Output that value. For more information about the *AND* operation see: http://en.wikipedia.org/wiki/Binary_and#AND

The first line contains an integer **T** (**T** = 100), that indicates the number of test cases.

*for around 90% of the cases;

**for the other test cases. The limits are those because 35+7=42 ;)

Output the maximum value for each test case, in a single line.

Sample Input | Sample Output |

3 2 1 10 20 6 3 7 6 2 3 6 7 4 2 1 2 3 3 |
20 6 3 |