#include<stdio.h>
int f[512],g[512];
int c[305][305];
int main()
{
	int n,k,m;
	scanf("%d%d%d",&n,&k,&m);
	n++;
	k++;
	for(int i=0;i<=n;i++)
	{
		c[i][0]=1;
		for(int j=1;j<=i;j++)
		{
			c[i][j]=c[i-1][j-1]+c[i-1][j];
			if(c[i][j]>=m)
			{
				c[i][j]-=m;
			}
		}
	}
	while(k--)
	{
		f[1]=1;
		for(int i=2;i<=n;i++)
		{
			f[i]=0;
			for(int j=1;j<i;j++)
			{
				int inc=(long long)g[j]*f[i-j]%m;
				f[i]+=(long long)inc*c[i-2][j-1]%m;
				if(f[i]>=m)
				{
					f[i]-=m;
				}
			}
		}
		for(int i=1;i<=n;i++)
		{
			g[i]+=f[i];
			if(g[i]>=m)
			{
				g[i]-=m;
			}
		}
	}
	printf("%d\n",f[n]);
	return 0;
}