#include <bits/stdc++.h>
using namespace std;
int n, m, f[55][55], g[55][55];
int inv[55];
void add(int &a, int b) {
  a += b;
  if (a >= 1000000007) a -= 1000000007;
}
void dec(int &a, int b) {
  a -= b;
  if (a < 0) a += 1000000007;
}
int get_comb(int x, int r) {
  int res = 1;
  add(x, r - 1);
  for (int i = 1; i <= r; i++) {
    res = 1LL * res * x % 1000000007;
    dec(x, 1);
    res = 1LL * res * inv[i] % 1000000007;
  }
  return res;
}
int main() {
  scanf("%d%d", &n, &m);
  inv[1] = 1;
  for (int i = 2; i <= 50; i++)
    inv[i] =
        1LL * (1000000007 - 1000000007 / i) * inv[1000000007 % i] % 1000000007;
  f[0][1] = 1;
  for (int i = 0; i <= n; i++) {
    for (int j = 1; j <= i + 1; j++) {
      for (int xi = 0; xi <= i - 1; xi++) {
        int yi = i - 1 - xi;
        for (int k = j; k <= xi + 1; k++)
          add(g[i][j], 1LL * f[xi][k] * f[yi][j] % 1000000007);
        for (int l = j + 1; l <= yi + 1; l++)
          add(g[i][j], 1LL * f[xi][j] * f[yi][l] % 1000000007);
      }
      if (g[i][j]) {
        for (int xi = n; xi >= 0; xi--)
          for (int xj = 1; xj <= xi + 1; xj++)
            for (int t = 1; xi + i * t <= n && xj + j * t <= n + 1; t++)
              add(f[xi + i * t][xj + j * t],
                  1LL * f[xi][xj] * get_comb(g[i][j], t) % 1000000007);
      }
    }
  }
  printf("%d\n", f[n][m]);
  return 0;
}
