#include <bits/stdc++.h>
using namespace std;
const int N = 54, M = 52, mod = 1e9 + 7;
int n, m, ifac[N], ans[N][N], F[N][N], dp[N][N];
long long pow(long long x, long long y, long long mod) {
  if (y == 0) return 1;
  long long p = pow(x, y / 2, mod);
  return ((p * p % mod) * (1 + (y % 2) * (x - 1))) % mod;
}
void make() {
  ifac[0] = 1;
  for (int i = 1; i < N; i++) ifac[i] = 1ll * ifac[i - 1] * i % mod;
  ifac[N - 1] = pow(ifac[N - 1], mod - 2, mod);
  for (int i = N - 2; i >= 1; i--)
    ifac[i] = 1ll * ifac[i + 1] * (i + 1ll) % mod;
}
int C(int k, int n) {
  int res = 1;
  n += k - 1;
  for (int i = n; i >= n - k + 1; i--) res = 1ll * res * i % mod;
  return 1ll * res * ifac[k] % mod;
}
void add(int n, int m) {
  for (int i = M - 1; i >= n; i--)
    for (int j = M - 1; j >= m; j--)
      for (int k = 1; k * n <= i && k * m <= j; k++) {
        dp[i][j] =
            (dp[i][j] + 1ll * C(k, F[n][m]) * dp[i - k * n][j - k * m] % mod) %
            mod;
      }
}
void calc_F(int n, int m) {
  for (int i = 0; i < n; i++)
    for (int j = m; j < i + 2; j++) {
      int n1 = i, m1 = j, n2 = n - 1 - i, m2 = m;
      if (m1 == m2)
        F[n][m] = (F[n][m] + 1ll * dp[n1][m1] * dp[n2][m2] % mod) % mod;
      else
        F[n][m] = (F[n][m] + 2ll * dp[n1][m1] * dp[n2][m2] % mod) % mod;
    }
  add(n, m);
}
int main() {
  cin >> n >> m;
  make();
  F[0][0] = dp[0][1] = 1;
  for (int i = 1; i < M; i++)
    for (int j = 1; j < M; j++) calc_F(i, j);
  cout << dp[n][m] << endl;
}
