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