#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
const int N = 55;
int n, m;
long long p[N][N], s[N][N], np[N][N], ff[N];
void upd(long long &a, long long b) { a = (a + b) % mod; }
int main() {
  scanf("%d%d", &n, &m);
  p[0][1] = 1;
  for (int i = 0; i < n + 1; i++) {
    for (int p1 = 0; p1 <= i - 1; p1++)
      for (int p2 = 1; p2 <= p1 + 1; p2++)
        for (int p3 = 1; p3 <= i - p1; p3++) {
          upd(s[i][min(p2, p3)], p[p1][p2] * p[i - 1 - p1][p3]);
        }
    if (i == 0) continue;
    for (int p3 = 1; p3 <= i + 1; p3++) {
      memset(np, 0, sizeof(np));
      long long r = 1;
      for (int k = 0; k * i <= n; k++) {
        ff[k] = r;
        r = r * (s[i][p3] + k) % mod * powmod(k + 1, mod - 2) % mod;
      }
      for (int p1 = 0; p1 <= n; p1++)
        for (int p2 = 1; p2 <= p1 + 1; p2++) {
          long long w = s[i][p3];
          for (int k = 0; k * i + p1 <= n; k++) {
            upd(np[k * i + p1][k * p3 + p2], ff[k] * p[p1][p2]);
          }
        }
      memcpy(p, np, sizeof(np));
    }
  }
  printf("%lld\n", p[n][m]);
}
