#include <bits/stdc++.h>
using namespace std;
int n, m;
int f[53][53], g[53][53], h[53][53], inv[53];
inline void Add(int &x, int y) {
  x += y;
  if (x >= 1000000007) x -= 1000000007;
  if (x < 0) x += 1000000007;
}
inline int qpow(int bas, int pw) {
  int ret = 1;
  for (; pw; pw >>= 1, bas = 1ll * bas * bas % 1000000007)
    if (pw & 1) ret = 1ll * ret * bas % 1000000007;
  return ret;
}
int main() {
  for (int i = 0; i < 53; ++i) inv[i] = qpow(i, 1000000007 - 2);
  scanf("%d%d", &n, &m);
  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)
          Add(g[i][j], 1ll * f[p][r] * f[q][j] % 1000000007);
        for (int s = j + 1; s <= q + 1; ++s)
          Add(g[i][j], 1ll * f[p][j] * f[q][s] % 1000000007);
      }
      memset(h, 0, sizeof h);
      for (int p = 0; p <= n; ++p)
        for (int q = 1; q <= p + 1; ++q) {
          long long comb = 1;
          for (int t = 1; p + t * i <= n; ++t) {
            comb = comb * (g[i][j] + t - 1) % 1000000007 * inv[t] % 1000000007;
            Add(h[p + t * i][q + t * j], 1ll * f[p][q] * comb % 1000000007);
          }
        }
      for (int p = 0; p <= n; ++p)
        for (int q = 1; q <= p + 1; ++q) Add(f[p][q], h[p][q]);
    }
  }
  cout << f[n][m] << endl;
  return 0;
}
