Little Gerald and his coach Mike play an interesting game. At the beginning of the game there is a pile consisting of *n* candies and a pile consisting of *m* stones. Gerald and Mike move in turns, Mike goes first. During his move Mike checks how many candies and stones Gerald has eaten. Let Gerald eat *a* candies and *b* stones. Then Mike awards Gerald *f*(*a*, *b*) prize points. Gerald during his move either eats a candy from the pile of candies or a stone from the pile of stones. As Mike sees that Gerald has eaten everything apart one candy and one stone, he awards points for the last time and the game ends. Gerald is not allowed to eat all the candies, and he is not allowed to eat all the stones too. Tell Gerald how to play to get the largest possible number of points: it is required to find one of the possible optimal playing strategies for Gerald.
The first line contains three integers *n*, *m*, *p* (1 ≤ *n*, *m* ≤ 20000, 1 ≤ *p* ≤ 10<sup class="upper-index">9</sup>). The second line contains *n* integers *x*<sub class="lower-index">0</sub>, *x*<sub class="lower-index">1</sub>, ..., *x*<sub class="lower-index">*n* - 1</sub> (0 ≤ *x*<sub class="lower-index">*i*</sub> ≤ 20000). The third line contains *m* integers *y*<sub class="lower-index">0</sub>, *y*<sub class="lower-index">1</sub>, ..., *y*<sub class="lower-index">*m* - 1</sub> (0 ≤ *y*<sub class="lower-index">*i*</sub> ≤ 20000). The value of *f*(*a*, *b*) is calculated as a remainder of the division of the sum *x*<sub class="lower-index">*a*</sub> + *y*<sub class="lower-index">*b*</sub> by number *p*.
print("_RANDOM_GUESS_1689438145.9826527")# 1689438145.9826727