#include <bits/stdc++.h>
using namespace std;
const int N = 53, mod = 1e9 + 7;
int n, m, f[N][N], g[N][N], h[N][N], F[N][N], inv[N];
void qmo(int &x) { x += x >> 31 & mod; }
int main() {
  scanf("%d%d", &n, &m);
  if (m == n + 1) {
    puts("1");
    return 0;
  }
  if (m > n + 1) {
    puts("0");
    return 0;
  }
  f[0][1] = F[0][1] = inv[1] = 1;
  for (int i = 2; i <= 50; ++i)
    inv[i] = mod - (long long)mod / i * inv[mod % i] % mod;
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j <= n; ++j)
      for (int k = 1; k <= i; ++k)
        h[i][j] = (h[i][j] + (long long)F[i - k][j] * F[k - 1][j]) % mod;
    for (int j = 1; j <= n; ++j) qmo(g[i][j] = h[i][j] - h[i][j + 1]);
    for (int j = 1; j <= n; ++j)
      for (int k = n; k >= i; --k)
        for (int l = n; l >= j; --l)
          for (int _ = 1, pw = 1; _ * i <= k && _ * j <= l; ++_) {
            pw = (g[i][j] + _ - 1ll) * pw % mod * inv[_] % mod;
            f[k][l] = (f[k][l] + (long long)pw * f[k - _ * i][l - _ * j]) % mod;
          }
    for (int j = n; j; --j) qmo(F[i][j] = F[i][j + 1] + f[i][j] - mod);
  }
  printf("%d\n", f[n][m]);
}
