#include <bits/stdc++.h>
using namespace std;
const int N = 60, mod = 1e9 + 7;
int rd() {
  int x = 0, w = 1;
  char ch = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + (ch ^ 48);
    ch = getchar();
  }
  return x * w;
}
void ad(int &x, int y) { x += y, x -= x >= mod ? mod : 0; }
int n, m, inv[N], f[N][N], bp[N][N], fx[N];
int main() {
  inv[0] = inv[1] = 1;
  for (int i = 2; i <= N - 5; ++i)
    inv[i] = (mod - 1ll * mod / i * inv[mod % i] % mod) % mod;
  n = rd() + 1, m = rd() - 1;
  f[1][1] = 1, bp[0][0] = 1;
  int nn = max(n, m);
  for (int i = 2; i <= n; ++i) {
    for (int j = 1; j <= nn; ++j) {
      if (!f[i - 1][j]) continue;
      fx[0] = 1;
      for (int k = 1; k <= nn; ++k)
        fx[k] = 1ll * fx[k - 1] * (f[i - 1][j] + k - 1) % mod * inv[k] % mod;
      for (int k = n; k; --k)
        for (int l = nn; l; --l)
          for (int o = 1; k - o * (i - 1) >= 0 && l - o * j >= 0; ++o)
            ad(bp[k][l], 1ll * bp[k - o * (i - 1)][l - o * j] * fx[o] % mod);
    }
    for (int j = 0; j < i; ++j)
      for (int k = 0; k <= nn; ++k)
        for (int l = 0; l <= nn; ++l)
          ad(f[i][min(k, l) + 1], 1ll * bp[j][k] * bp[i - 1 - j][l] % mod);
  }
  printf("%d\n", bp[n - 1][m]);
  return 0;
}
