#include <bits/stdc++.h>
using namespace std;
const long long p = 1e9 + 7;
long long n, m, i, j, t, k, xlh, w, ny[100010], a[52][52], f[52][52], g[52][52];
int main() {
  scanf("%lld%lld", &n, &m);
  ny[0] = ny[1] = 1;
  for (i = 2; i <= n + 1; i++) ny[i] = ny[p % i] * (p - p / i) % p;
  f[0][1] = 1;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= i + 1; j++) {
      for (t = 0; t < i; t++) {
        for (k = j; k <= t + 1; k++)
          g[i][j] = (g[i][j] + f[t][k] * f[i - t - 1][j]) % p;
        for (k = j + 1; k <= i - t; k++)
          g[i][j] = (g[i][j] + f[t][j] * f[i - t - 1][k]) % p;
      }
      memset(a, 0, sizeof(a));
      for (t = 0; t + i <= n; t++) {
        for (k = 1; k + j <= n + 1; k++) {
          xlh = 1;
          for (w = 1; k + w * j <= n + 1 && t + w * i <= n; w++) {
            xlh = xlh * (g[i][j] + w - 1) % p * ny[w] % p;
            (a[t + i * w][k + j * w] += f[t][k] * xlh % p) %= p;
          }
        }
      }
      for (t = i; t <= n; t++)
        for (k = j; k <= t + 1; k++) f[t][k] = (f[t][k] + a[t][k]) % p;
    }
  printf("%lld", f[n][m]);
}
