#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const int N = 55;
long long f[N][N], g[N][N], ng[N][N], inv[500];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  inv[1] = 1;
  for (int n = 2; n < 500; n++) {
    inv[n] = (mod - mod / n) * inv[mod % n] % mod;
  }
  memset(f, 0, sizeof(f));
  memset(g, 0, sizeof(g));
  f[0][1] = g[0][1] = 1;
  for (int n = 1; n < N; n++) {
    for (int k = 1; k < N; k++) {
      for (int n1 = 0; n1 <= n - 1; n1++) {
        int n2 = n - 1 - n1;
        for (int k1 = k - 1; k1 < N; k1++) {
          f[n][k] += g[n1][k1] * g[n2][k - 1] % mod;
          f[n][k] += g[n2][k1] * g[n1][k - 1] % mod;
        }
        f[n][k] -= g[n1][k - 1] * g[n2][k - 1] % mod;
      }
      f[n][k] %= mod;
      if (f[n][k] < 0) f[n][k] += mod;
      memset(ng, 0, sizeof(ng));
      for (int pn = 0; pn < N; pn++) {
        for (int pk = 0; pk < N; pk++) {
          long long prod = f[n][k];
          for (int d = 1; d < N; d++) {
            int totn = pn + d * n;
            if (totn >= N) break;
            int totk = pk + d * (k - 1);
            if (totk >= N) break;
            ng[totn][totk] += prod * g[pn][pk] % mod;
            if (ng[totn][totk] >= mod) ng[totn][totk] -= mod;
            (prod *= f[n][k] + d) %= mod;
            (prod *= inv[d + 1]) %= mod;
          }
        }
      }
      for (int i = 0; i < N; i++) {
        for (int j = 0; j < N; j++) {
          g[i][j] += ng[i][j];
          if (g[i][j] >= mod) g[i][j] -= mod;
        }
      }
    }
  }
  int n, k;
  cin >> n >> k;
  cout << g[n][k] << '\n';
  return 0;
}
