#include <bits/stdc++.h>
using namespace std;
unsigned long long INF;
unsigned long long MOD;
unsigned long long add(unsigned long long x, unsigned long long y) {
  x += y;
  if (x >= MOD) return x - MOD;
  return x;
}
unsigned long long sub(unsigned long long x, unsigned long long y) {
  if (x < y) x += MOD;
  return x - y;
}
unsigned long long mult(unsigned long long x, unsigned long long y) {
  return (x * y) % MOD;
}
const int N = 222;
unsigned long long C[N][N];
int d;
unsigned long long a[N];
unsigned long long b[N][N];
unsigned long long dp[N][N];
unsigned long long solve(int n) {
  for (int i = 0; i <= min(n - 1, d); i++)
    for (int j = 0; j < n; j++) dp[i][j] = 0;
  dp[0][n - 1] = 1 % MOD;
  for (int i = 0; i < min(n - 1, d); i++)
    for (int x = 0; x < n; x++) {
      dp[i][x] %= MOD;
      if (dp[i][x] == 0) continue;
      for (int y = 1; y <= x; y++) {
        dp[i + 1][x - y] += dp[i][x] * ((a[y] * C[x - 1][y - 1]) % MOD) % MOD;
      }
    }
  unsigned long long res = 0;
  for (int i = 0; i <= min(n - 1, d); i++) {
    b[n][i] = dp[i][0] % MOD;
    res += dp[i][0] % MOD;
  }
  return res % MOD;
}
int main() {
  int n;
  scanf("%d%d%llu", &n, &d, &MOD);
  if (n == 1) {
    throw;
    printf("0\n");
    return 0;
  }
  if (n == 2) {
    unsigned long long ans = 4;
    printf("%llu\n", ans % MOD);
    return 0;
  }
  if (d == 1) {
    printf("0\n");
    return 0;
  }
  d--;
  for (int i = 0; i < N; i++) C[i][0] = C[i][i] = 1 % MOD;
  for (int i = 1; i < N; i++)
    for (int j = 1; j < i; j++) C[i][j] = add(C[i - 1][j - 1], C[i - 1][j]);
  a[0] = 1 % MOD;
  for (int i = 1; i < n; i++) a[i] = solve(i);
  d++;
  a[n] = solve(n);
  unsigned long long ans = sub(a[n], b[n][1]);
  ans = add(ans, ans);
  for (int x = 1; x < n - 1; x++) {
    unsigned long long sum = 0;
    for (int i = 2; i <= d - 2; i++) sum = add(sum, b[n - x][i]);
    for (int i = 2; i <= d - 2; i++) {
      ans = add(ans, mult(sum, b[x + 1][i]));
      sum = sub(sum, b[n - x][d - i]);
    }
  }
  for (int x = 1; x <= n; x++)
    for (int y = 1; x + y <= n; y++)
      ans = add(ans, mult(sub(a[x], b[x][1]), sub(a[y], b[y][1])));
  ans *= n * (n - 1) * 2;
  ans %= MOD;
  printf("%llu\n", ans);
  return 0;
}
