#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <climits>

using namespace std;

const int maxN=307;

long long dp[maxN][maxN],s[maxN][maxN],c[maxN][maxN];

int main(){
	int n,m,k;
	scanf("%d%d%d",&n,&k,&m);

	for (int i=0;i<=n;i++) {
		c[i][0]=c[i][i]=1;
		for (int j=1;j<i;j++) c[i][j]=(c[i-1][j]+c[i-1][j-1])%m;
	}

	for (int i=0;i<=k;i++) dp[1][i]=1,s[1][i]=(k-i+1)%m;
	for (int i=2;i<=n+1;i++) 
		for (int j=k;j>=0;j--){
			for (int t=1;t<i;t++) dp[i][j]=(dp[i][j]+dp[i-t][j]*c[i-2][t-1]%m*s[t][j+1]%m)%m;
			s[i][j]=(s[i][j+1]+dp[i][j])%m;
		}

	printf("%lld\n",dp[n+1][0]);
	return 0;
}
