#include <bits/stdc++.h>
using namespace std;
int const maxn = 55, mod = 1e9 + 7;
auto const fast = (cin.tie(0), cout.tie(0), ios::sync_with_stdio(0));
int add(int x, int y) { return (x + y) % mod; }
int sub(int x, int y) { return (x - y + mod) % mod; }
int mul(int x, int y) { return 1ll * x * y % mod; }
int n, m, inv[maxn], dp[maxn][maxn], ans[maxn][maxn], sum[maxn][maxn],
    pdt[maxn][maxn], diff[maxn][maxn];
int main() {
  cin >> n >> m, dp[0][0] = ans[0][1] = inv[0] = inv[1] = 1;
  for (int i = 2; i <= n + 1; i++) inv[i] = mul(mod - mod / i, inv[mod % i]);
  for (int i = 1; i <= n; i++) {
    for (int j = n + 1; j >= 1; j--)
      sum[i - 1][j] = add(sum[i - 1][j + 1], ans[i - 1][j]);
    for (int j = n + 1; j >= 1; j--) {
      pdt[i][j] = 0;
      for (int k = 0; k < i; k++)
        pdt[i][j] = add(pdt[i][j], mul(sum[k][j], sum[i - 1 - k][j]));
      diff[i][j] = sub(pdt[i][j], pdt[i][j + 1]);
    }
    for (int j = n + 1; j >= 1; j--)
      for (int x = n; x >= 0; x--)
        for (int y = n + 1; y >= 0; y--) {
          int fac0 = diff[i][j], fac1 = 1;
          for (int k = 1; k * i <= x && k * j <= y; k++)
            dp[x][y] =
                add(dp[x][y], mul(dp[x - k * i][y - k * j], mul(fac0, fac1))),
            fac0 = mul(fac0, diff[i][j] + k), fac1 = mul(fac1, inv[k + 1]);
        }
    for (int j = n + 1; j >= 1; j--) ans[i][j] = dp[i][j - 1];
  }
  cout << ans[n][m] << endl;
  return 0;
}
