#include <bits/stdc++.h>
const int N = 57, P = 1000000007;
void mod(int& x) { x -= P, x += x >> 31 & P; }
int mul(int a, int b) { return 1ll * a * b % P; }
int f[N][N], g[N][N], t[N][N], inv[N];
int main() {
  int n, m;
  scanf("%d%d", &n, &m), inv[0] = inv[1] = f[0][1] = 1;
  for (int i = 2; i <= n; ++i) inv[i] = mul(inv[P % i], P - P / i);
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= i + 1; ++j) {
      for (int k = 0; k <= i - 1; ++k) {
        for (int l = j; l <= k + 1; ++l)
          mod(g[i][j] += mul(f[k][l], f[i - 1 - k][j]));
        for (int l = j + 1; l <= i - k; ++l)
          mod(g[i][j] += mul(f[k][j], f[i - 1 - k][l]));
      }
      memset(t, 0, sizeof t);
      for (int k = 0; k <= n; ++k)
        for (int p = 1; p <= k + 1; ++p)
          for (int q = 1, s = 1; k + q * i <= n; ++q)
            s = mul(mul(s, g[i][j] + q - 1), inv[q]),
            mod(t[k + q * i][p + q * j] += mul(f[k][p], s));
      for (int k = 0; k <= n; ++k)
        for (int l = 1; l <= k + 1; ++l) mod(f[k][l] += t[k][l]);
    }
  printf("%d", f[n][m]);
}
