# Day 29: Bitwise AND

## Objective 
Welcome to the last day! Today, we're discussing bitwise operations. Check out the [Tutorial](https://www.hackerrank.com/challenges/30-bitwise-and/tutorial) tab for learning materials and an instructional video!

### Task 
Given set S. Find two integers, A and B (where A < B), from set S such that the _value of A&B is the maximum possible and also less than a given integer, K_. In this case, & represents the bitwise AND operator.

### Input Format

The first line contains an integer, T, the number of test cases. Each of the T subsequent lines defines a test case as 2 space-separated integers, N and K, respectively.

### Output Format

For each test case, print the maximum possible value of on a new line.

### Sample Input
```Python
3 5 2 8 5 2 2
```
### Sample Output
```Python
1 4 0
```