#include <bits/stdc++.h>
using namespace std;
const int maxn = 55, mod = 1e9 + 7;
int n, m, inv[maxn], f[maxn][maxn], g[maxn][maxn], t[maxn][maxn];
int main() {
  scanf("%d%d", &n, &m);
  inv[1] = 1;
  for (int i = 2; i <= n + 1; ++i)
    inv[i] = (long long)(mod - mod / i) * inv[mod % i] % mod;
  f[0][1] = 1;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= i + 1; ++j) {
      for (int k = 0; k < i; ++k) {
        for (int l = j; l <= k + 1; ++l)
          g[i][j] = (g[i][j] + (long long)f[k][l] * f[i - k - 1][j]) % mod;
        for (int l = j + 1; l <= i - k; ++l)
          g[i][j] = (g[i][j] + (long long)f[k][j] * f[i - k - 1][l]) % mod;
      }
      memset(t, 0, sizeof(t));
      for (int p = 0; p + i <= n; ++p)
        for (int q = 1; q + j <= n + 1; ++q)
          for (int C = 1, x = 1; p + x * i <= n && q + x * i <= n + 1; ++x) {
            C = (long long)C * (g[i][j] + x - 1) % mod * inv[x] % mod;
            t[p + x * i][q + x * j] =
                (t[p + x * i][q + x * j] + (long long)C * f[p][q]) % mod;
          }
      for (int p = i; p <= n; ++p)
        for (int q = j; q <= p + 1; ++q) {
          f[p][q] += t[p][q];
          if (f[p][q] >= mod) f[p][q] -= mod;
        }
    }
  printf("%d\n", f[n][m]);
  return 0;
}
