#include <bits/stdc++.h>
using namespace std;
template <typename T>
struct outputer;
struct outputable {};
template <typename T>
inline auto sqr(T x) -> decltype(x * x) {
  return x * x;
}
template <typename T1, typename T2>
inline bool umx(T1& a, T2 b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T1, typename T2>
inline bool umn(T1& a, T2 b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
const int N = 50;
const int64_t mod = 1000000007;
struct Input {
  int n, m;
  bool read() { return !!(cin >> n >> m); }
  void init(const Input& input) { *this = input; }
};
struct Data : Input {
  int64_t ans;
  void write() { cout << ans << endl; }
};
namespace Main {
struct Solution : Data {
  int64_t d[N + 1][N + 1];
  int64_t p[N + 1][N + 1];
  int64_t dd[N + 1][N + 1][N + 2][N + 2];
  int64_t rev[N + 1];
  int64_t pw(int64_t a, int64_t k) {
    int64_t res = 1;
    while (k) {
      if (k & 1) {
        (res *= a) %= mod;
      }
      (a *= a) %= mod;
      k >>= 1;
    }
    return res;
  }
  void solve() {
    for (int i = int(0); i < int(N + 1); ++i) {
      rev[i] = pw(i, mod - 2);
    }
    memset(d, 0, sizeof d);
    memset(p, 0, sizeof p);
    memset(dd, 0, sizeof dd);
    dd[0][0][0][0] = 1;
    for (int i = int(0); i < int(N + 1); ++i) {
      for (int j = int(0); j < int(N + 1); ++j) {
        if (i && j) {
          for (int x = int(0); x < int(i); ++x) {
            for (int y = int(j - 1); y < int(N + 1); ++y) {
              (p[i][j] += d[x][y] * d[i - 1 - x][j - 1]) %= mod;
              if (y != j - 1) {
                (p[i][j] += d[x][y] * d[i - 1 - x][j - 1]) %= mod;
              }
            }
          }
        }
        for (int x = int(0); x < int(N + 1); ++x) {
          for (int y = int(0); y < int(N + 1); ++y) {
            ;
            (dd[i][j][x][y + 1] += dd[i][j][x][y]) %= mod;
            if (x && y) {
              int64_t c = 1;
              for (int k = int(1); k < int(min(i / x, j / y) + 1); ++k) {
                c = c * (p[x][y] + k - 1) % mod * rev[k] % mod;
                (dd[i][j][x][y + 1] += dd[i - k * x][j - k * y][x][y] * c) %=
                    mod;
                ;
              }
            };
          }
          dd[i][j][x + 1][0] = dd[i][j][x][N + 1];
        }
        d[i][j] = dd[i][j][N + 1][0];
        ;
        ;
        ;
      }
    }
    ans = d[n][m - 1];
  }
  void clear() { *this = Solution(); }
};
}  // namespace Main
Main::Solution sol;
int main() {
  cout.setf(ios::showpoint | ios::fixed);
  cout.precision(20);
  sol.read();
  sol.solve();
  sol.write();
  return 0;
}
