#include <bits/stdc++.h>
using namespace std;
bool debug = 0;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
string direc = "RDLU";
long long ln, lk, lm;
void etp(bool f = 0) {
  puts(f ? "YES" : "NO");
  exit(0);
}
void addmod(int &x, int y, int mod = 1000000007) {
  assert(y >= 0);
  x += y;
  if (x >= mod) x -= mod;
  assert(x >= 0 && x < mod);
}
void et() {
  puts("-1");
  exit(0);
}
long long fastPow(long long x, long long y, int mod = 1000000007) {
  long long ans = 1;
  while (y > 0) {
    if (y & 1) ans = (x * ans) % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return ans;
}
int f[55][55], g[55][55], h[55][55];
int inv[55];
void fmain(int tid) {
  scanf("%d%d", &n, &m);
  inv[0] = 1;
  for (int(i) = 1; (i) <= (int)(53); (i)++) inv[i] = fastPow(i, 1000000007 - 2);
  f[0][1] = 1;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= i + 1; j++) {
      for (int p = 0; p <= i - 1; p++) {
        int q = i - 1 - p;
        for (int r = j; r <= p + 1; r++) {
          addmod(g[i][j], (long long)f[p][r] * f[q][j] % 1000000007);
        }
        for (int s = j + 1; s <= q + 1; s++) {
          addmod(g[i][j], (long long)f[p][j] * f[q][s] % 1000000007);
        }
      }
      memset(h, 0, sizeof h);
      for (int(p) = 0; (p) < (int)(n + 1); (p)++)
        for (int q = 1; q <= p + 1; q++) {
          int com = 1;
          for (int t = 1; t * i + p <= n; t++) {
            com = (long long)com * (g[i][j] + t - 1) % 1000000007 * inv[t] %
                  1000000007;
            addmod(h[t * i + p][q + t * j],
                   (long long)f[p][q] * com % 1000000007);
          }
        }
      for (int(p) = 0; (p) < (int)(n + 1); (p)++)
        for (int q = 1; q <= p + 1; q++) addmod(f[p][q], h[p][q]);
    }
  }
  printf("%d\n", f[n][m]);
}
int main() {
  int t = 1;
  for (int(i) = 1; (i) <= (int)(t); (i)++) {
    fmain(i);
  }
  return 0;
}
