#include<bits/stdc++.h>
using namespace std;
const int N = 311;
#define fr(i,a,b) for(int i = a;i <= b; ++i)
#define nfr(i,a,b) for(int i = a;i >= b; --i)

int n,m,p;
int f[N][N];
int sum[N];
int c[N][N];

inline void add(int &x,int y){
   x += y; if(x >= p)x -= p;
}

int main(){
   scanf("%d%d%d",&n,&m,&p);
   memset(f,0,sizeof f);
   
   fr(i,0,n)c[i][0] = 1;
   fr(i,1,n){
      fr(j,1,n){
         c[i][j] = (c[i-1][j]+c[i-1][j-1])%p;
      }
   }
   
   fr(i,0,m)f[i][1] = 1;
   fr(i,2,n+1){
      memset(sum,0,sizeof sum);
      nfr(j,m-1,0){
         fr(k,1,i-1)add(sum[k],f[j+1][k]);
         fr(k,1,i-1){
            add(f[j][i],1LL*f[j][i-k]*sum[k]%p*c[i-2][k-1]%p);
         }
      }
   }
   printf("%d\n",f[0][n+1]);
   return 0;
}
