#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 55;
int n, m;
int f[N][N], g[N][N], h[N][N], F[N][N], inv[N];
inline long long qpow(long long a, long long b) {
  long long res = 1;
  for (; b; b >>= 1, a = a * a % mod)
    if (b & 1) res = res * a % mod;
  return res;
}
inline void add(int &x, int y) {
  x += y;
  if (x >= mod) x -= mod;
}
inline void dec(int &x, int y) {
  x -= y;
  if (x < 0) x += mod;
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n + 1; i++) inv[i] = qpow(i, mod - 2);
  f[0][1] = 1;
  h[0][0] = 1;
  for (int i = 1; i <= n; i++) {
    for (int j = n + 1; j >= 1; j--)
      F[i - 1][j] = (F[i - 1][j + 1] + f[i - 1][j]) % mod;
    for (int j = n + 1; j >= 1; j--)
      for (int k = 0; k < i; k++)
        add(g[i][j], 1ll * F[k][j] * F[i - k - 1][j] % mod);
    for (int j = 1; j <= n + 1; j++) dec(g[i][j], g[i][j + 1]);
    for (int j = 1; j <= n + 1; j++)
      for (int x = n; x >= 0; x--)
        for (int y = n + 1; y >= 0; y--) {
          int res = 0, c = 1;
          for (int k = 0; k * i <= x && k * j <= y; k++) {
            add(res, 1ll * h[x - k * i][y - k * j] * c % mod);
            c = 1ll * c * (g[i][j] + k) % mod * inv[k + 1] % mod;
          }
          h[x][y] = res;
        }
    for (int j = 1; j <= n + 1; j++) f[i][j] = h[i][j - 1];
  }
  printf("%d", f[n][m]);
  return 0;
}
