Pisces now defines a sequence as follows:
$$ f(n)=\left\{
\begin{aligned}
&a, & n = 0 \\
&b, & n = 1 \\
&f(n-2)⊕ f(n-1), & n > 1
\end{aligned}
\right.
$$
where ⊕ denotes the bitwise XOR operation. Now you are given three integers \(a, b\) and \(n\), calculate \(f(n)\).
You have to answer \(T\) independent test cases.