#include <bits/stdc++.h>
using namespace std;
const int P = 1e9 + 7;
int f[53][53], g[53][53], N, M, iv[53];
void inc(int &a, int b) { a = a + b >= P ? a + b - P : a + b; }
int main() {
  cin >> N >> M;
  f[0][1] = 1;
  iv[1] = 1;
  for (int i = 2; i <= 50; ++i) iv[i] = P - 1ll * (P / i) * iv[P % i] % P;
  if (M == N + 1) {
    puts("1");
    return 0;
  } else if (M > N) {
    puts("0");
    return 0;
  }
  for (int i = 1; i <= N; ++i) {
    memset(g, 0, sizeof(g));
    for (int j = 0; j <= i - 1; ++j)
      for (int k = 1; k <= N; ++k)
        for (int p = 0; p <= N - j - 1; ++p)
          for (int q = 1; q <= N; ++q)
            inc(g[j + p + 1][min(k, q)], 1ll * f[j][k] * f[p][q] % P);
    memset(f, 0, sizeof(f));
    f[0][1] = 1;
    for (int j = 1; j <= N; ++j)
      for (int k = 1; k <= N; ++k)
        if (g[j][k])
          for (int p = N; p >= j; --p)
            for (int q = N; q >= k; --q)
              for (int c = 1, tms = 1; c * j <= p && c * k <= q; ++c) {
                tms = 1ll * tms * (g[j][k] + c - 1) % P * iv[c] % P;
                f[p][q] = (f[p][q] + 1ll * f[p - c * j][q - c * k] * tms) % P;
              }
  }
  cout << f[N][M];
  return 0;
}
