You are a happy possessor of the powerful tool called Beautiful Sequence Unraveler (BSU). This tool works with beautiful sequences. A beautiful sequence is an array a_1,a_2,…,a_n of n integers for which the following statement holds: there are no integers i such that 1≤i<n and maxa_1,…,a_i=mina_i+1,…a_n.
BSU deals with beautiful sequences pretty well, but you do not know how frequently such sequences occur. So you want to calculate the number of beautiful sequences among all the arrays of length n which consist of integers between 1 and k, inclusively. Since this number may be large, you are required to calculate it modulo prime number p.
The only line contains three integers n, k, p (1≤n≤400, 1≤k≤108, 998,244,353≤p≤109+9).
It is guaranteed that p is prime.
Print the answer to the problem modulo p.