#include <bits/stdc++.h>
using namespace std;
const int mo = 1000000007;
const int N = 55;
int n, m, inv[N], tr[N];
int g[N][N], f[N][N];
int main() {
  scanf("%d%d", &n, &m);
  f[0][1] = inv[0] = inv[1] = tr[0] = 1;
  for (int i = (int)(2); i <= (int)(N - 1); i++)
    inv[i] = 1ll * inv[mo % i] * (mo - mo / i) % mo;
  for (int i = (int)(1); i <= (int)(n); i++) {
    for (int j = (int)(0); j <= (int)(i - 1); j++)
      for (int v1 = (int)(1); v1 <= (int)(j + 1); v1++)
        for (int v2 = (int)(1); v2 <= (int)(i - j); v2++)
          g[i][min(v1, v2)] =
              (g[i][min(v1, v2)] + 1ll * f[j][v1] * f[i - j - 1][v2]) % mo;
    for (int j = (int)(1); j <= (int)(n + 1); j++) {
      for (int k = (int)(1); k <= (int)(n / max(i, j)); k++)
        tr[k] = 1ll * tr[k - 1] * inv[k] % mo * (g[i][j] + k - 1) % mo;
      for (int v1 = (int)(n); v1 >= (int)(i); v1--)
        for (int v2 = (int)(n + 1); v2 >= (int)(j); v2--)
          for (int k = (int)(1); k <= (int)(min(v1 / i, v2 / j)); k++)
            f[v1][v2] =
                (f[v1][v2] + 1ll * f[v1 - i * k][v2 - j * k] * tr[k]) % mo;
    }
  }
  printf("%d\n", f[n][m]);
}
