#include <bits/stdc++.h>
using namespace std;
const int N = 60;
const int mod = 1e9 + 7;
int f[N][N], g[N][N], dp[N][N][N][N], h[N][N];
int inv[N];
int main() {
  int i, j, a, b, k;
  int n, m;
  int tmp;
  int curm;
  scanf("%d%d", &n, &curm);
  m = max(n, curm);
  inv[1] = 1;
  for (i = 2; i <= 50; i++)
    inv[i] = 1ll * (-mod / i + mod) * inv[mod % i] % mod;
  g[0][1] = 1;
  for (i = m; i >= 0; i--) h[0][i] = (g[0][i] + h[0][i + 1]) % mod;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++) {
      for (k = 0; k < i; k++) {
        f[i][j] = (f[i][j] + 1ll * g[k][j] * h[i - 1 - k][j] +
                   1ll * h[k][j + 1] * g[i - 1 - k][j]) %
                  mod;
      }
      for (a = n; a >= i; a--) {
        for (b = m; b >= j; b--) {
          tmp = 1;
          for (k = 1; k <= a / i && k <= b / j; k++) {
            tmp = 1ll * tmp * (f[i][j] + k - 1) % mod * inv[k] % mod;
            g[a][b] = (g[a][b] + 1ll * g[a - k * i][b - k * j] * tmp) % mod;
          }
        }
      }
    }
    for (j = m; j >= 0; j--) h[i][j] = (g[i][j] + h[i][j + 1]) % mod;
  }
  printf("%d\n", g[n][curm]);
}
