#include <bits/stdc++.h>
using namespace std;
const long long N = 54;
const long long mod = 1e9 + 7;
long long f[N][N], g[N][N], nf[N][N], inv[N];
long long binpow(long long x, long long y) {
  long long tich = 1;
  while (y) {
    if (y & 1) {
      tich *= x;
      tich %= mod;
    }
    x *= x;
    x %= mod;
    y >>= 1;
  }
  return tich;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n, i, j, k, l, m, x, cnt, mul;
  cin >> n >> m;
  inv[0] = 1;
  for (i = 1; i <= n; i++) {
    inv[i] = binpow(i, mod - 2);
  }
  memset(f, 0, sizeof(f));
  memset(g, 0, sizeof(g));
  f[0][1] = 1;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= i; j++) {
      for (k = 0; k < i; k++) {
        l = i - 1 - k;
        for (x = j; x <= l + 1; x++) {
          g[i][j] += f[k][j] * f[l][x];
          g[i][j] %= mod;
        }
        for (x = j + 1; x <= k + 1; x++) {
          g[i][j] += f[k][x] * f[l][j];
          g[i][j] %= mod;
        }
      }
      memset(nf, 0, sizeof(nf));
      for (k = 0; k <= n; k++) {
        for (l = 1; l <= k + 1; l++) {
          mul = 1;
          for (cnt = 1; k + cnt * i <= n; cnt++) {
            mul = (mul * inv[cnt]) % mod;
            mul = (mul * (g[i][j] + cnt - 1)) % mod;
            nf[k + cnt * i][l + cnt * j] += mul * f[k][l];
            nf[k + cnt * i][l + cnt * j] %= mod;
          }
        }
      }
      for (k = 0; k <= n; k++) {
        for (l = 1; l <= k + 1; l++) {
          f[k][l] += nf[k][l];
          if (f[k][l] >= mod) {
            f[k][l] -= mod;
          }
        }
      }
    }
  }
  cout << f[n][m];
}
