#include <bits/stdc++.h>
const long double PI = acos(-1);
const long double eps = 0.0000000001;
const long long INF = 0x3fffffffffffffff;
const long long MOD = 1000000007;
long long n, m, f[55][55], g[55][55], inv[55];
long long power(long long A, long long B) {
  long long res = 1;
  while (B) {
    if (B & 1) res = res * A % MOD;
    B >>= 1;
    A = A * A % MOD;
  }
  return res;
}
long long C(long long n, long long m) {
  long long res = 1;
  for (long long i = m; i != m - n; --i) res = res * i % MOD;
  for (long long i = 1; i <= n; ++i) res = res * power(i, MOD - 2) % MOD;
  return res;
}
signed main() {
  std::ios::sync_with_stdio(false);
  std::cin >> n >> m;
  inv[1] = 1;
  for (long long i = 2; i <= n; ++i)
    inv[i] = (MOD - MOD / i) * inv[MOD % i] % MOD;
  f[0][1] = 1;
  for (long long i = 1; i <= n; ++i) {
    for (long long j = 0; j < i; ++j)
      for (long long k = 0; k <= n + 1; ++k)
        for (long long l = 0; l <= n + 1; ++l)
          g[i][std::min(k, l)] =
              (g[i][std::min(k, l)] + f[j][k] * f[i - j - 1][l]) % MOD;
    for (long long j = 0; j <= i; ++j)
      for (long long k = n; k >= i; --k)
        for (long long l = j; l <= n + 2; ++l)
          for (long long o = 1, s = g[i][j] + o - 1; o * i <= k && o * j <= l;
               ++o, s = s * inv[o] % MOD * (g[i][j] + o - 1) % MOD)
            f[k][l] = (f[k][l] + f[k - o * i][l - o * j] * s) % MOD;
  }
  std::cout << f[n][m] << std::endl;
  return 0;
}
