Find the 16 last digits of the number a_n, where the sequence a_n is defined recursively as follows:
Two integers and are given as input (7 \le p \le 100, 1 \le n \le 100), where is a prime number.
Output the remainder of a_n divided by 10^{16}, without leading zeros in the result.
Example 1