#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int first = 0, f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar()) {
    if (ch == '-') f = -1;
  }
  for (; isdigit(ch); ch = getchar()) {
    first = first * 10 + ch - 48;
  }
  return first * f;
}
const int mxN = 50;
const int P = 1e9 + 7;
int n, m;
long long f[mxN + 3][mxN + 3][2];
long long g[mxN + 3][mxN + 3];
long long inv[mxN + 3];
void updsum(long long &first, long long second) {
  first += first + second >= P ? second - P : second;
}
int main() {
  inv[1] = 1ll;
  for (int i = 2; i <= mxN; i++) inv[i] = P - (P / i) * inv[P % i] % P;
  n = read(), m = read();
  f[0][0][1] = f[0][1][1] = 1ll;
  g[0][0] = 1ll;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n + 1; j++) {
      for (int ii = 0; ii <= i - 1; ii++) {
        updsum(f[i][j][0], f[ii][j][1] * f[i - 1 - ii][j][1] % P);
      }
    }
    for (int j = 1; j <= n + 1; j++) {
      updsum(f[i][j][0], P - f[i][j + 1][0]);
    }
    for (int j = 1; j <= n + 1; j++) {
      for (int ii = n; ii >= 1; ii--)
        for (int jj = n + 1; jj >= 1; jj--) {
          long long coe = 1ll;
          for (int k = 1; ii - i * k >= 0 && jj - j * k >= 0; k++) {
            coe = coe * (f[i][j][0] + k - 1ll) % P * inv[k] % P;
            updsum(g[ii][jj], g[ii - i * k][jj - j * k] * coe % P);
          }
        }
    }
    for (int j = 1; j <= n + 1; j++) {
      f[i][j][1] = g[i][j - 1];
    }
    for (int j = n + 1; j >= 1; j--) {
      updsum(f[i][j][1], f[i][j + 1][1]);
    }
  }
  printf("%lld\n", (f[n][m][1] - f[n][m + 1][1] + P) % P);
  return 0;
}
