You are given the following pseudo code:
res = a
for i = 1 to k
if i is odd
res = res & b
else
res = res | b
You are also given the values of a, b, and k. Find the final value of res.
Input
Output
Print the final value of res for each test case in a new line.
Constraints
1≤T≤105
1≤a,b,k≤1018
Since k=1,res=4&5=4