Data science is very popular now. A lot of universities have courses about it. A lot of companies have open data science positions. So it's quite important to know how to work with statistics. And this task can help you to make first step into statistics.
Lets define S as all strings of the length n consisting of letters from the some alphabet of the size a. For each string s lets define f(s) - maximum among all z-function values of the string s. Your task is calculate ∑s∈Sf(s) modulo mod.
You can read more about z-function on https://e-maxx-eng.appspot.com/string/z-function.html. Also in this problem we define z0=0.
Input format
First line of input contains three space separated integers n, a and mod (1≤n≤22, 1≤a≤109, 1≤mod≤109).
Note that mod may be composite.
Output format
Print the single integer ∑s∈Sf(s) modulo mod.