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

long long dp[310][310], sum[310][310];
long long C[310][310];

int main () {
	int n, k, mod; scanf("%d%d%d", &n, &k, &mod);
	for (int i = 0; i <= 300; i++) {
		C[i][0] = 1;
		for (int j = 1; j <= i; j++) {
			C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % mod;
		}
	}
	for (int i = 0; i <= k; i++) {
		dp[1][i] = 1;
	}
	for (int i = 2; i <= n + 1; i++) {
		for (int j = k; j >= 0; j--) {
			sum[i - 1][j] = (sum[i - 1][j + 1] + dp[i - 1][j]) % mod;
		}
		for (int j = 0; j <= k; j++) {
			for (int ni = 1; ni <= i - 1; ni++) {
				dp[i][j] = (dp[i][j] + sum[ni][j + 1] * C[i - 2][ni - 1] % mod * dp[i - ni][j]) % mod;
			}
		}
	}
	printf("%lld\n", dp[n + 1][0]);
	return 0;
}
