There are n![]() machines in front of you, and each of them has a cute button on it.
For the i
machines in front of you, and each of them has a cute button on it.
For the i![]() -th machine, if you push the button on it, it will give you a coin valued at a
-th machine, if you push the button on it, it will give you a coin valued at a![]() i
i![]()
![]() . If you push the button again, it will give you a coin valued at b
. If you push the button again, it will give you a coin valued at b![]() i
i![]()
![]() . If you push the button the third time, it will give you a coin valued at a
. If you push the button the third time, it will give you a coin valued at a![]() i
i![]()
![]() again. However, it won't give you coins any more even you push the button because the i
again. However, it won't give you coins any more even you push the button because the i![]() -th machine only has three coins. 
Now you want to obtain k
-th machine only has three coins. 
Now you want to obtain k![]() coins from these machines, and you should make the total value of these coins as maximum as possible. Let's denote the maximum total value of these k
coins from these machines, and you should make the total value of these coins as maximum as possible. Let's denote the maximum total value of these k![]() coins as f(k)
coins as f(k)![]() . 
You are required to output the value of f(1)⊕f(2)⊕f(3)⊕⋯⊕f(m)
. 
You are required to output the value of f(1)⊕f(2)⊕f(3)⊕⋯⊕f(m)![]() , where m
, where m![]() is a given number and ⊕
is a given number and ⊕![]() means the xor operatation.
means the xor operatation. 
	To avoid spending too much time reading all the data, we use xorshift128plus algorithm to generate the testdata, this algorithm is parameterized with two initial seed k![]() 1
1![]()
![]() and k
and k![]() 2
2![]()
![]() . Please refer to the code (written in C++) in the below:
. Please refer to the code (written in C++) in the below:
	