#include <bits/stdc++.h>
using namespace std;
int ran() { return (rand() << 15) + rand(); }
int IN() {
  int first = 0;
  char c;
  for (; (c = getchar()) < 48 && c ^ '-' || c > 57;)
    ;
  bool f = c == '-';
  if (f) (c = getchar());
  for (; c > 47 && c < 58; (c = getchar()))
    first = (first << 1) + (first << 3) + c - 48;
  return f ? -first : first;
}
void print(int first, char en = '\n') {
  printf("%d", first);
  if (en) putchar(en);
}
void hello() { freopen("remi.in", "r", stdin); }
const int mo = 1e9 + 7, lim = 55;
int ga[lim + 10], invga[lim + 10];
void inc(int &first, int second) {
  if ((first += second) >= mo) first -= mo;
}
void dec(int &first, int second) {
  if ((first -= second) < 0) first += mo;
}
int Pow(int first, int second) {
  int z = 1;
  for (; second; second >>= 1, first = 1ll * first * first % mo)
    if (second & 1) z = 1ll * z * first % mo;
  return z;
}
int binom(int n, int m) {
  int res = 1;
  for (int first = n; first > n - m; --first) {
    res = 1ll * res * first % mo;
  }
  res = 1ll * res * invga[m] % mo;
  if (res < 0) res += mo;
  return res;
}
int n, m, dp[55][55], coe[55][55], f[55][55];
int main(int argc, char *argv[]) {
  n = IN();
  m = IN();
  *ga = 1;
  for (int _r = lim, i = 1; i <= _r; ++i) ga[i] = 1ll * ga[i - 1] * i % mo;
  for (int _r = lim, i = 0; i <= _r; ++i) invga[i] = Pow(ga[i], mo - 2);
  dp[0][1] = 1;
  for (int _r = n, i = 1; i <= _r; ++i) {
    for (int _r = i, p = 0; p < _r; ++p) {
      int q = i - 1 - p;
      for (int _r = p + 1, j = 1; j <= _r; ++j)
        for (int _r = q + 1, k = j; k <= _r; ++k)
          inc(f[i][j], 1ll * dp[p][j] * dp[q][k] % mo);
      for (int _r = q + 1, j = 1; j <= _r; ++j)
        for (int _r = p + 1, k = j + 1; k <= _r; ++k)
          inc(f[i][j], 1ll * dp[q][j] * dp[p][k] % mo);
    }
    for (int _r = i + 1, j = 1; j <= _r; ++j) {
      for (int _r = n, k = 1; k <= _r; ++k)
        coe[j][k] = binom(f[i][j] + k - 1, k);
      for (int _l = 0, first = n + 1; first >= _l; --first)
        for (int _r = first + 1, second = 1; second <= _r; ++second)
          for (int k = 1; k * i + first <= n; ++k)
            inc(dp[k * i + first][k * j + second],
                1ll * dp[first][second] * coe[j][k] % mo);
    }
  }
  print(dp[n][m]);
}
