#include<bits/stdc++.h>
using namespace std;

const int N = 305;
typedef long long LL;

int n, m;
LL ans, mod, f[N][N], suf[N][N], c[N][N];

int main() {
	cin>>n>>m>>mod;
	c[0][0] = 1;
	for(int i = 1; i <= max(n, m); i++) {
		c[i][0] = 1;
		for(int j = 1; j <= i; j++)
		    c[i][j] = (c[i - 1][j - 1] + c[i - 1][j])%mod; 
	}
	for(int i = 0; i <= m; i++) 
		f[1][i] = 1, suf[1][i] = m - i + 1;
	for(int i = 2; i <= n + 1; i++) {
		for(int j = m; j >= 0; j--) {
			for(int k = 1; k < i; k++)
				f[i][j] = (f[i][j] + c[i - 2][k - 1]*f[i - k][j]%mod*suf[k][j + 1])%mod;
			suf[i][j] = (suf[i][j + 1] + f[i][j])%mod;
		}
	}
	cout<<f[n + 1][0]<<endl;
	return 0;
}