#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
  int f = 0;
  x = 0;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar()) f |= (ch == '-');
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
  if (f) x = -x;
}
const int N = 55, mod = 1e9 + 7;
int f[N][N], g[N][N], t[N][N], inv[N];
int n, m;
int fix(int x) { return x >= mod ? x - mod : x; }
int mul(int x, int y) { return (long long)x * y % mod; }
void add(int &x, int y) { x = (x + y >= mod ? x + y - mod : x + y); }
int main() {
  read(n), read(m);
  inv[1] = 1;
  for (int i = (2); i <= (n + 1); i++)
    inv[i] = mul(mod - mod / i, inv[mod % i]);
  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++) {
        for (int q = (j); q <= (p + 1); q++)
          add(g[i][j], mul(f[p][q], f[i - p - 1][j]));
        for (int q = (j + 1); q <= (i - p); q++)
          add(g[i][j], mul(f[p][j], f[i - p - 1][q]));
      }
      memset(t, 0, sizeof t);
      for (int p = (0); p <= (n - i); p++)
        for (int q = (0); q <= (n + 1 - j); q++) {
          int C = 1;
          for (int k = 1; p + i * k <= n && q + i * k <= n + 1; k++) {
            C = mul(C, mul(g[i][j] + k - 1, inv[k]));
            add(t[p + i * k][q + j * k], mul(f[p][q], C));
          }
        }
      for (int p = (i); p <= (n); p++)
        for (int q = (j); q <= (n + 1); q++) add(f[p][q], t[p][q]);
    }
  cout << f[n][m] << endl;
  return 0;
}
