#include <bits/stdc++.h>
//#define int long long
#define FOR(i,a,b) for(int i = (a); i <= (b); i++)
#define RE(i,n) FOR(i,1,n)
#define REP(i,n) FOR(i,0,(n)-1)
#define MP make_pair
#define PB push_back
#define st first
#define nd second
#define SZ(x) ((int)(x).size())
#ifndef LOCAL
#define cerr if(0)cout
#endif
using namespace std;
const int N = 2e2 + 5;
int dp[N][N][N];
int newt[N][N];
int inv[N];
int spow(int a, int b, int P) {
int r = 1;
while (b) {
if (b % 2) {
r = 1ll * r * a % P;
}
a = 1ll * a * a % P;
b /= 2;
}
return r;
}
int Inv(int a, int P) {
return spow(a, P - 2, P);
}
int P;
#undef int
int main() {
#define int long long
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, max_d;
cin>>n>>max_d>>P;
if (n == 1) {
cout<<(max_d == 0)<<endl;
return 0;
}
if (n == 2) {
cout<<(max_d == 1)<<endl;
return 0;
}
if (max_d <= 1) {
cout<<"0\n";
return 0;
}
int npar = max_d % 2;
max_d /= 2;
RE (i, n) {
inv[i] = Inv(i, P);
}
dp[1][0][0] = 1;
RE (dep, max_d) {
dp[1][dep][0] = 1;
FOR (sz, 2, n) {
RE (max_son, sz - 1) {
// Wkladamy synow wielkosci max_son
// aby sumarycznie miec sz wierzcholkow
// Albo nie dokladamy nikogo (dp[max_son][dep - 1][max_son - 1])
// albo dokladamy l synow wielkosci max_son
// i wtedy bierzemy wynik z dp[prev][dep][prev - 1]
// l synow takiej wielkosci wybieramy ilestam sposobow
int cur = dp[max_son][dep - 1][max_son - 1];
dp[sz][dep][max_son] = dp[sz][dep][max_son - 1];
for (int l = 1; l * max_son < sz; l++) {
int prev = sz - l * max_son;
dp[sz][dep][max_son] = (dp[sz][dep][max_son] + 1ll * dp[prev][dep][min(prev, max_son) - 1] * cur) % P;
cur = 1ll * cur * inv[l + 1] % P * (dp[max_son][dep - 1][max_son - 1] + l) % P;
//cerr<<cur<<endl;
}
cerr<<"dp["<<sz<<"]["<<dep<<"]["<<max_son<<"]="<<dp[sz][dep][max_son]<<endl;
}
}
}
long long res = 0;
if (npar) {
for (int l = 1; 2 * l < n; l++) {
int r = n - l;
res += 1ll * (dp[l][max_d][l - 1] - dp[l][max_d - 1][l - 1] + P) * (dp[r][max_d][r - 1] - dp[r][max_d - 1][r - 1] + P);
res %= P;
}
if (n % 2 == 0) {
long long K = dp[n / 2][max_d][n / 2 - 1] - dp[n / 2][max_d - 1][n / 2 - 1] + P;
res += 1ll * K * (K + 1) / 2;
}
cout<<res % P<<endl;
} else {
res = (dp[n][max_d][n - 1] - dp[n][max_d - 1][n - 1] + P) % P;
RE (big_son, n - 1) {
long long BIG_DEEP = dp[big_son][max_d - 1][big_son - 1];
if (max_d >= 2) {
BIG_DEEP = (BIG_DEEP - dp[big_son][max_d - 2][big_son - 1] + P) % P;
}
res = (res - (BIG_DEEP * dp[n - big_son][max_d - 1][n - big_son - 1]) % P + P) % P;
}
cout<<res<<endl;
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+Ci8vI2RlZmluZSBpbnQgbG9uZyBsb25nCiNkZWZpbmUgRk9SKGksYSxiKSBmb3IoaW50IGkgPSAoYSk7IGkgPD0gKGIpOyBpKyspCiNkZWZpbmUgUkUoaSxuKSBGT1IoaSwxLG4pCiNkZWZpbmUgUkVQKGksbikgRk9SKGksMCwobiktMSkKI2RlZmluZSBNUCBtYWtlX3BhaXIKI2RlZmluZSBQQiBwdXNoX2JhY2sKI2RlZmluZSBzdCBmaXJzdAojZGVmaW5lIG5kIHNlY29uZAojZGVmaW5lIFNaKHgpICgoaW50KSh4KS5zaXplKCkpCiNpZm5kZWYgTE9DQUwKI2RlZmluZSBjZXJyIGlmKDApY291dAojZW5kaWYKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKY29uc3QgaW50IE4gPSAyZTIgKyA1OwoKaW50IGRwW05dW05dW05dOwppbnQgbmV3dFtOXVtOXTsKaW50IGludltOXTsKaW50IHNwb3coaW50IGEsIGludCBiLCBpbnQgUCkgewogIGludCByID0gMTsKICB3aGlsZSAoYikgewogICAgaWYgKGIgJSAyKSB7CiAgICAgIHIgPSAxbGwgKiByICogYSAlIFA7CiAgICB9CiAgICBhID0gMWxsICogYSAqIGEgJSBQOwogICAgYiAvPSAyOwogIH0KICByZXR1cm4gcjsKfQppbnQgSW52KGludCBhLCBpbnQgUCkgewogIHJldHVybiBzcG93KGEsIFAgLSAyLCBQKTsKfQppbnQgUDsKI3VuZGVmIGludAppbnQgbWFpbigpIHsKI2RlZmluZSBpbnQgbG9uZyBsb25nCiAgaW9zX2Jhc2U6OnN5bmNfd2l0aF9zdGRpbygwKTsKICBjaW4udGllKDApOwogIAogIGludCBuLCBtYXhfZDsKICBjaW4+Pm4+Pm1heF9kPj5QOwogIGlmIChuID09IDEpIHsKICAgIGNvdXQ8PChtYXhfZCA9PSAwKTw8ZW5kbDsKICAgIHJldHVybiAwOwogIH0KICBpZiAobiA9PSAyKSB7CiAgICBjb3V0PDwobWF4X2QgPT0gMSk8PGVuZGw7CiAgICByZXR1cm4gMDsKICB9CiAgaWYgKG1heF9kIDw9IDEpIHsKICAgIGNvdXQ8PCIwXG4iOwogICAgcmV0dXJuIDA7CiAgfQogIGludCBucGFyID0gbWF4X2QgJSAyOwogIG1heF9kIC89IDI7CiAgUkUgKGksIG4pIHsKICAgIGludltpXSA9IEludihpLCBQKTsKICB9CiAgZHBbMV1bMF1bMF0gPSAxOwogIFJFIChkZXAsIG1heF9kKSB7CiAgICBkcFsxXVtkZXBdWzBdID0gMTsKICAgIEZPUiAoc3osIDIsIG4pIHsKICAgICAgUkUgKG1heF9zb24sIHN6IC0gMSkgewogICAgICAgIC8vIFdrbGFkYW15IHN5bm93IHdpZWxrb3NjaSBtYXhfc29uCiAgICAgICAgLy8gYWJ5IHN1bWFyeWN6bmllIG1pZWMgc3ogd2llcnpjaG9sa293CiAgICAgICAgLy8gQWxibyBuaWUgZG9rbGFkYW15IG5pa29nbyAoZHBbbWF4X3Nvbl1bZGVwIC0gMV1bbWF4X3NvbiAtIDFdKQogICAgICAgIC8vIGFsYm8gZG9rbGFkYW15IGwgc3lub3cgd2llbGtvc2NpIG1heF9zb24KICAgICAgICAvLyBpIHd0ZWR5IGJpZXJ6ZW15IHd5bmlrIHogZHBbcHJldl1bZGVwXVtwcmV2IC0gMV0KICAgICAgICAvLyBsIHN5bm93IHRha2llaiB3aWVsa29zY2kgd3liaWVyYW15IGlsZXN0YW0gc3Bvc29ib3cKICAgICAgICBpbnQgY3VyID0gZHBbbWF4X3Nvbl1bZGVwIC0gMV1bbWF4X3NvbiAtIDFdOwogICAgICAgIGRwW3N6XVtkZXBdW21heF9zb25dID0gZHBbc3pdW2RlcF1bbWF4X3NvbiAtIDFdOwogICAgICAgIGZvciAoaW50IGwgPSAxOyBsICogbWF4X3NvbiA8IHN6OyBsKyspIHsKICAgICAgICAgIGludCBwcmV2ID0gc3ogLSBsICogbWF4X3NvbjsKICAgICAgICAgIGRwW3N6XVtkZXBdW21heF9zb25dID0gKGRwW3N6XVtkZXBdW21heF9zb25dICsgMWxsICogZHBbcHJldl1bZGVwXVttaW4ocHJldiwgbWF4X3NvbikgLSAxXSAqIGN1cikgJSBQOwogICAgICAgICAgY3VyID0gMWxsICogY3VyICogaW52W2wgKyAxXSAlIFAgKiAoZHBbbWF4X3Nvbl1bZGVwIC0gMV1bbWF4X3NvbiAtIDFdICsgbCkgJSBQOwogICAgICAgICAgLy9jZXJyPDxjdXI8PGVuZGw7CiAgICAgICAgfQogICAgICAgIGNlcnI8PCJkcFsiPDxzejw8Il1bIjw8ZGVwPDwiXVsiPDxtYXhfc29uPDwiXT0iPDxkcFtzel1bZGVwXVttYXhfc29uXTw8ZW5kbDsKICAgICAgfQogICAgfQogIH0KICBsb25nIGxvbmcgcmVzID0gMDsKICBpZiAobnBhcikgewogICAgZm9yIChpbnQgbCA9IDE7IDIgKiBsIDwgbjsgbCsrKSB7CiAgICAgIGludCByID0gbiAtIGw7CiAgICAgIHJlcyArPSAxbGwgKiAoZHB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