Let us fix an integer k≥2 and define a function f: N→N:
f(n)={ n/k, if k∣n n−1, otherwise
If we take some integer n≥1 and will apply function f some (possibly 0) times then we will end up with 1. For example, if k=3 then f(f(f(f(f(16)))))=f(f(f(f(15))))=f(f(f(5)))=f(f(4))=f(3)=1.
Your task is to calculate the amount of such n that we will end up with 1 after exactly m iterations. The answer may be very large, so you have to output it modulo mod.
The first line contains three integers separated by spaces: k, m, mod (2≤k≤104, 0≤m≤1018, 2≤mod<300). It is guaranteed that mod is prime.
Print one integer: the answer to the problem modulo mod.
N is the set of positive integers.