Alice and Bob want to secretly transmit messages to each other. For this, they have developed a random number generator (RNG), which is initialized with three integers: a_0, a_1, and . The first elements of the RNG are a_0 and a_1, and the following elements are constructed as follows:
Alice and Bob will use the RNG in the data transfer scheme, as shown in the figure below.

To create the RNG, they want to write a procedure that calculates the value of a_k for a given . Help them!
\InputFileOne line contains four integers , a_0, a_1, and (0 \leq a_0, a_1 < n \leq 200, 0 \leq k \leq 10^9).
\OutputFilePrint the value of a_k.
1-nji mysal
2-nji mysal
3-nji mysal