#include <bits/stdc++.h>
using namespace std;
const int P = 1e9 + 7;
int f[53][53], g[103][103], h[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) {
    for (int j = 0; j <= i - 1; ++j)
      for (int k = 1; k <= N; ++k)
        if (f[j][k])
          for (int p = 0; p <= i - 1; ++p)
            for (int q = 1; q <= N; ++q)
              if (f[p][q] && (j == i - 1 || p == i - 1))
                inc(g[j + p + 1][min(k, q)], 1ll * f[j][k] * f[p][q] % P);
    for (int k = 1; k <= N; ++k)
      if (g[i][k])
        for (int p = N; p >= i; --p)
          for (int q = N; q >= k; --q)
            for (int c = 1, tms = 1; c * i <= p && c * k <= q; ++c) {
              tms = 1ll * tms * (g[i][k] + c - 1) % P * iv[c] % P;
              f[p][q] = (f[p][q] + 1ll * f[p - c * i][q - c * k] * tms) % P;
            }
  }
  cout << f[N][M];
  return 0;
}
