Find the number of the possible tuples of sequences (A_0,A_1,...,A_N) that satisfy all of the following conditions, modulo M:

* For every i (0\leq i\leq N), A_i is a sequence of length i consisting of integers between 1 and K (inclusive);
* For every i (1\leq i\leq N), A_{i-1} is a subsequence of A_i, that is, there exists 1\leq x_i\leq i such that the removal of the x_i-th element of A_i would result in a sequence equal to A_{i-1};
* For every i (1\leq i\leq N), A_i is lexicographically larger than A_{i-1}.

Constraints

* 1 \leq N,K \leq 300
* 2 \leq M \leq 10^9
* N, K and M are integers.

Input

Input is given from Standard Input in the following format:


N K M


Output

Print the number of the possible tuples of sequences (A_0,A_1,...,A_N), modulo M.

Examples

Input

2 2 100


Output

5


Input

4 3 999999999


Output

358


Input

150 150 998244353


Output

186248260
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i = (a); i < (b); ++i)
#define rrep(i,a,b) for(int i = (b); i --> (a);)
#define all(v) (v).begin(),(v).end()
#define trav(x,v) for(auto &x : v)
#define sz(v) int(v.size())
typedef vector<int> vi;
typedef long long ll;
typedef vector<ll> vl;
typedef pair<int,int> pii;

int main(){
	cin.sync_with_stdio(0);
	cin.tie(0);

	int n, k;
	ll m;
	cin >> n >> k >> m;

	vector<vl> bin(n+1, vl(n+1));
	rep(a,0,n+1){
		bin[a][0] = 1;
		rep(b,1,a+1)
			bin[a][b] = (bin[a-1][b-1] + bin[a-1][b]) % m;
	}

	vector<vl> f(n+1, vl(k+1)), F(n+1, vl(k+1));

	rep(b,0,k+1){
		f[0][b] = 1;
		if(b > 0) rep(a,0,n+1)
			F[a][b] = (F[a][b-1] + f[a][b-1])%m;
		rep(A,0,n+1){
			rep(a,0,A)
				f[A][b] += F[a][b]*f[A-1-a][b]%m * bin[A-1][a] % m;
			f[A][b] %= m;
		}
	}
	cout << f[n][k] << endl;
}