#include <bits/stdc++.h>
using namespace std;
const int MN = 55, MOD = 1e9 + 7;
int dp[2][MN][MN];
bool seen[2][MN][MN];
int c[MN][MN];
int Two;
int bpw(int a, int b) {
  if (!b) return 1;
  int t = bpw(a, b / 2);
  t = 1ll * t * t % MOD;
  if (b % 2) return 1ll * t * a % MOD;
  return t;
}
void ok(int &x) {
  if (x >= MOD) x -= MOD;
}
void prep() {
  c[0][0] = 1;
  for (int i = 1; i < MN; ++i)
    for (int j = 0; j <= i; ++j)
      if (j == 0)
        c[i][j] = 1;
      else
        c[i][j] = c[i - 1][j - 1] + c[i - 1][j], ok(c[i][j]);
}
int make(int n, int k0, int k1);
void func(int &res, int L, int R, int l0, int l1, int r0, int r1, int k0,
          int k1) {
  if (max(l0, l1) + max(r0, r1) != k0) return;
  if (max(max(l0, l1) + r0 + 1, l0 + 1 + max(r0, r1)) != k1) return;
  int val = 1ll * c[L + R][2] * c[L + R - 2][L - 1] % MOD;
  val = 1ll * val * make(L, l0, l1) % MOD;
  val = 1ll * val * make(R, r0, r1) % MOD;
  res += val;
  if (res >= MOD) res -= MOD;
}
int make(int n, int k0, int k1) {
  if (seen[k1 - k0][n][k0]) return dp[k1 - k0][n][k0];
  seen[k1 - k0][n][k0] = true;
  if (n == 1) {
    if (k0 == k1 && k0 == 0)
      return dp[k1 - k0][n][k0] = 1;
    else
      return dp[k1 - k0][n][k0] = 0;
  }
  int ret = 0;
  for (int t0 = 0; t0 <= max(k0, k1); ++t0)
    for (int t1 = t0; t1 <= t0 + 1; ++t1)
      if (max(t0, t1) == k0 && t0 + 1 == k1)
        ret += 1ll * (n - 1) * make(n - 1, t0, t1) % MOD, ok(ret);
  for (int L = 1; L <= n - 1; ++L) {
    int R = n - 1 - L;
    for (int l0 = 0; l0 <= L / 2; ++l0)
      for (int l1 = l0; l1 <= l0 + 1; ++l1)
        for (int r0 = 0; r0 <= R / 2; ++r0)
          for (int r1 = r0; r1 <= r0 + 1; ++r1)
            func(ret, L, R, l0, l1, r0, r1, k0, k1);
  }
  return dp[k1 - k0][n][k0] = ret;
}
int main() {
  ios_base ::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  prep();
  int n, k;
  cin >> n >> k;
  int ans = 0;
  ans = make(n, k - 1, k) + make(n, k, k);
  ok(ans);
  cout << ans << '\n';
  return 0;
}

### Prompt

Generate a cpp solution to the following problem:

Ksenia has her winter exams. Today she is learning combinatorics. Here's one of the problems she needs to learn to solve.

How many distinct trees are there consisting of n vertices, each with the following properties:

  * the tree is marked, that is, the vertices of the tree are numbered from 1 to n; 
  * each vertex of the tree is connected with at most three other vertices, and at the same moment the vertex with number 1 is connected with at most two other vertices; 
  * the size of the tree's maximum matching equals k. 



Two trees are considered distinct if there are such two vertices u and v, that in one tree they are connected by an edge and in the other tree they are not.

Help Ksenia solve the problem for the given n and k. As the answer to the problem can be very huge you should output it modulo 1000000007 (109 + 7).

Input

The first line contains two integers n, k (1 ≤ n, k ≤ 50).

Output

Print a single integer — the answer to the problem modulo 1000000007 (109 + 7).

Examples

Input

1 1


Output

0


Input

2 1


Output

1


Input

3 1


Output

3


Input

4 2


Output

12

Note

If you aren't familiar with matchings, please, read the following link: http://en.wikipedia.org/wiki/Matching_(graph_theory).

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const int MN = 55, MOD = 1e9 + 7;
int dp[2][MN][MN];
bool seen[2][MN][MN];
int c[MN][MN];
int Two;
int bpw(int a, int b) {
  if (!b) return 1;
  int t = bpw(a, b / 2);
  t = 1ll * t * t % MOD;
  if (b % 2) return 1ll * t * a % MOD;
  return t;
}
void ok(int &x) {
  if (x >= MOD) x -= MOD;
}
void prep() {
  c[0][0] = 1;
  for (int i = 1; i < MN; ++i)
    for (int j = 0; j <= i; ++j)
      if (j == 0)
        c[i][j] = 1;
      else
        c[i][j] = c[i - 1][j - 1] + c[i - 1][j], ok(c[i][j]);
}
int make(int n, int k0, int k1);
void func(int &res, int L, int R, int l0, int l1, int r0, int r1, int k0,
          int k1) {
  if (max(l0, l1) + max(r0, r1) != k0) return;
  if (max(max(l0, l1) + r0 + 1, l0 + 1 + max(r0, r1)) != k1) return;
  int val = 1ll * c[L + R][2] * c[L + R - 2][L - 1] % MOD;
  val = 1ll * val * make(L, l0, l1) % MOD;
  val = 1ll * val * make(R, r0, r1) % MOD;
  res += val;
  if (res >= MOD) res -= MOD;
}
int make(int n, int k0, int k1) {
  if (seen[k1 - k0][n][k0]) return dp[k1 - k0][n][k0];
  seen[k1 - k0][n][k0] = true;
  if (n == 1) {
    if (k0 == k1 && k0 == 0)
      return dp[k1 - k0][n][k0] = 1;
    else
      return dp[k1 - k0][n][k0] = 0;
  }
  int ret = 0;
  for (int t0 = 0; t0 <= max(k0, k1); ++t0)
    for (int t1 = t0; t1 <= t0 + 1; ++t1)
      if (max(t0, t1) == k0 && t0 + 1 == k1)
        ret += 1ll * (n - 1) * make(n - 1, t0, t1) % MOD, ok(ret);
  for (int L = 1; L <= n - 1; ++L) {
    int R = n - 1 - L;
    for (int l0 = 0; l0 <= L / 2; ++l0)
      for (int l1 = l0; l1 <= l0 + 1; ++l1)
        for (int r0 = 0; r0 <= R / 2; ++r0)
          for (int r1 = r0; r1 <= r0 + 1; ++r1)
            func(ret, L, R, l0, l1, r0, r1, k0, k1);
  }
  return dp[k1 - k0][n][k0] = ret;
}
int main() {
  ios_base ::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  prep();
  int n, k;
  cin >> n >> k;
  int ans = 0;
  ans = make(n, k - 1, k) + make(n, k, k);
  ok(ans);
  cout << ans << '\n';
  return 0;
}

```