#include <bits/stdc++.h>
using namespace std;
const int MAXN = 6e5 + 10, MAXM = 4e6 + 10;
const int INF = INT_MAX, SINF = 0x3f3f3f3f;
const long long llINF = LLONG_MAX;
const int MOD = 1e9 + 7, mod = 1e9 + 7;
const int Lim = 1 << 20;
long long f[55][55], g[55][55], h[55][55], inv[65];
int n, m;
int main() {
  f[0][1] = 1;
  scanf("%d%d", &n, &m);
  inv[1] = 1;
  for (int i = 2; i <= 60; i++)
    inv[i] = (MOD - MOD / i * inv[MOD % i] % MOD) % MOD;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= i + 1; j++) {
      for (int a = 0; a <= i - 1; a++) {
        int b = i - 1 - a;
        for (int u = j; u <= a + 1; u++) (g[i][j] += f[a][u] * f[b][j]) %= MOD;
        for (int u = j + 1; u <= b + 1; u++)
          (g[i][j] += f[a][j] * f[b][u]) %= MOD;
      }
      memset(h, 0, sizeof(h));
      for (int x = 0; x <= n; x++)
        for (int y = 1; y <= x + 1; y++) {
          long long comb = 1;
          for (int t = 1; x + t * i <= n; t++) {
            (comb *= (g[i][j] + t - 1) * inv[t] % MOD) %= MOD;
            (h[x + t * i][y + t * j] += f[x][y] * comb) %= MOD;
          }
        }
      for (int x = 0; x <= n; x++)
        for (int y = 0; y <= x + 1; y++) (f[x][y] += h[x][y]) %= MOD;
    }
  cout << f[n][m];
  return 0;
}
