#include <bits/stdc++.h>
using namespace std;
const int N = 60, p = 1e9 + 7;
int f[N][N], sf[N][N], g[N][N], sg[N][N];
int inv[N], fac[N], dp[N][N], n, m;
long long fpow(long long a, long long b) {
  long long c = 1;
  for (; b; b >>= 1, (a *= a) %= p)
    if (b & 1) (c *= a) %= p;
  return c;
}
int calc(int n, int m, int a, int b) {
  int ans = 0, tmp = 1;
  for (int i = 0; i * a <= n && i * b <= m; i++) {
    (ans += 1LL * dp[n - i * a][m - i * b] * tmp % p * inv[i] % p) %= p;
    tmp = 1LL * tmp * (g[a][b] + i) % p;
  }
  return ans;
}
int main() {
  scanf("%d%d", &n, &m);
  fac[0] = inv[0] = 1;
  for (int i = 1; i <= 50; i++) {
    fac[i] = 1LL * fac[i - 1] * i % p;
    inv[i] = fpow(fac[i], p - 2);
  }
  f[0][1] = dp[0][0] = 1;
  for (int i = 1; i <= n; i++) {
    for (int j = n + 1; j >= 1; j--)
      sf[i - 1][j] = (sf[i - 1][j + 1] + f[i - 1][j]) % p;
    for (int j = n + 1; j >= 1; j--) {
      sg[i][j] = 0;
      for (int k = 0; k < i; k++)
        (sg[i][j] += 1LL * sf[k][j] * sf[i - k - 1][j] % p) %= p;
      g[i][j] = (sg[i][j] - sg[i][j + 1] + p) % p;
    }
    for (int j = 1; j <= n + 1; j++)
      for (int x = n; x >= 0; x--)
        for (int y = n + 1; y >= 0; y--) dp[x][y] = calc(x, y, i, j);
    for (int j = 1; j <= n + 1; j++) f[i][j] = dp[i][j - 1];
  }
  printf("%d\n", f[n][m]);
  return 0;
}
