#include <bits/stdc++.h>
using namespace std;
template <typename T>
T abs(T a) {
  return a < 0 ? -a : a;
}
template <typename T>
T sqr(T a) {
  return a * a;
}
const int INF = (int)1e9;
const long double EPS = 1e-9;
const long double PI = 3.1415926535897932384626433832795;
const int N = 60;
const int MOD = 1000000007;
int C[N][N];
int z[N][N][N];
int solve(int n, int d0, int d1) {
  if (n <= 0 || d0 < 0 || d1 < 0) return 0;
  int& res = z[n][d0][d1];
  if (res == -1) {
    res = 0;
    if (n == 1) {
      return res = ((d0 == 0) && (d1 == 0)) ? 1 : 0;
    }
    res = (int)(((n - 1) * 1ll * solve(n - 1, d1, d0 - 1)) % MOD);
    vector<pair<int, int> > tc;
    for (int lf = 1; lf < n - 1; ++lf) {
      int rg = n - 1 - lf;
      int cur = 0;
      for (int lf0 = 0; lf0 <= d1 && lf0 <= (lf >> 1); ++lf0) {
        int rg0 = d1 - lf0;
        if (rg0 < 0 || rg0 > (rg >> 1)) continue;
        tc.clear();
        for (int lf1 = 0; lf1 <= (lf >> 1); ++lf1) {
          int rg1 = d0 - lf0 - 1;
          if (rg1 < 0 || rg1 > (rg >> 1) || lf1 + rg0 + 1 > rg1 + lf0 + 1)
            continue;
          tc.push_back(pair<int, int>(lf1, rg1));
        }
        for (int rg1 = 0; rg1 <= (rg >> 1); ++rg1) {
          int lf1 = d0 - rg0 - 1;
          if (lf1 < 0 || lf1 > (lf >> 1) || rg1 + lf0 + 1 > lf1 + rg0 + 1)
            continue;
          tc.push_back(pair<int, int>(lf1, rg1));
        }
        sort((tc).begin(), (tc).end());
        tc.erase(unique((tc).begin(), (tc).end()), tc.end());
        for (int i = 0; i < int(int((tc).size())); ++i) {
          int lf1 = tc[i].first;
          int rg1 = tc[i].second;
          int e0 = max(lf1 + rg0 + 1, lf0 + rg1 + 1);
          int e1 = lf0 + rg0;
          if (e0 == d0 && e1 == d1) {
            int val =
                (int)((solve(lf, lf0, lf1) * 1ll * solve(rg, rg0, rg1)) % MOD);
            val = (int)((lf * 1ll * val) % MOD);
            val = (int)((rg * 1ll * val) % MOD);
            cur = (int)((cur + C[n - 2][lf - 1] * 1ll * val) % MOD);
          }
        }
      }
      res += cur;
      if (res >= MOD) res -= MOD;
    }
  }
  return res;
}
int main() {
  for (int i = 0; i < N; ++i) {
    C[i][0] = C[i][i] = 1;
    for (int j = 1; j < i; ++j) C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % MOD;
  }
  int n, k;
  cin >> n >> k;
  if (k > (n >> 1)) {
    cout << 0 << endl;
    return 0;
  }
  memset(z, -1, sizeof(z));
  int ans = 0;
  for (int i = 0; i < int((n >> 1) + 1); ++i) {
    ans = (ans + solve(n, k, i)) % MOD;
  }
  cout << ans << endl;
  return 0;
}

### Prompt

Create a solution in Cpp for 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;
template <typename T>
T abs(T a) {
  return a < 0 ? -a : a;
}
template <typename T>
T sqr(T a) {
  return a * a;
}
const int INF = (int)1e9;
const long double EPS = 1e-9;
const long double PI = 3.1415926535897932384626433832795;
const int N = 60;
const int MOD = 1000000007;
int C[N][N];
int z[N][N][N];
int solve(int n, int d0, int d1) {
  if (n <= 0 || d0 < 0 || d1 < 0) return 0;
  int& res = z[n][d0][d1];
  if (res == -1) {
    res = 0;
    if (n == 1) {
      return res = ((d0 == 0) && (d1 == 0)) ? 1 : 0;
    }
    res = (int)(((n - 1) * 1ll * solve(n - 1, d1, d0 - 1)) % MOD);
    vector<pair<int, int> > tc;
    for (int lf = 1; lf < n - 1; ++lf) {
      int rg = n - 1 - lf;
      int cur = 0;
      for (int lf0 = 0; lf0 <= d1 && lf0 <= (lf >> 1); ++lf0) {
        int rg0 = d1 - lf0;
        if (rg0 < 0 || rg0 > (rg >> 1)) continue;
        tc.clear();
        for (int lf1 = 0; lf1 <= (lf >> 1); ++lf1) {
          int rg1 = d0 - lf0 - 1;
          if (rg1 < 0 || rg1 > (rg >> 1) || lf1 + rg0 + 1 > rg1 + lf0 + 1)
            continue;
          tc.push_back(pair<int, int>(lf1, rg1));
        }
        for (int rg1 = 0; rg1 <= (rg >> 1); ++rg1) {
          int lf1 = d0 - rg0 - 1;
          if (lf1 < 0 || lf1 > (lf >> 1) || rg1 + lf0 + 1 > lf1 + rg0 + 1)
            continue;
          tc.push_back(pair<int, int>(lf1, rg1));
        }
        sort((tc).begin(), (tc).end());
        tc.erase(unique((tc).begin(), (tc).end()), tc.end());
        for (int i = 0; i < int(int((tc).size())); ++i) {
          int lf1 = tc[i].first;
          int rg1 = tc[i].second;
          int e0 = max(lf1 + rg0 + 1, lf0 + rg1 + 1);
          int e1 = lf0 + rg0;
          if (e0 == d0 && e1 == d1) {
            int val =
                (int)((solve(lf, lf0, lf1) * 1ll * solve(rg, rg0, rg1)) % MOD);
            val = (int)((lf * 1ll * val) % MOD);
            val = (int)((rg * 1ll * val) % MOD);
            cur = (int)((cur + C[n - 2][lf - 1] * 1ll * val) % MOD);
          }
        }
      }
      res += cur;
      if (res >= MOD) res -= MOD;
    }
  }
  return res;
}
int main() {
  for (int i = 0; i < N; ++i) {
    C[i][0] = C[i][i] = 1;
    for (int j = 1; j < i; ++j) C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % MOD;
  }
  int n, k;
  cin >> n >> k;
  if (k > (n >> 1)) {
    cout << 0 << endl;
    return 0;
  }
  memset(z, -1, sizeof(z));
  int ans = 0;
  for (int i = 0; i < int((n >> 1) + 1); ++i) {
    ans = (ans + solve(n, k, i)) % MOD;
  }
  cout << ans << endl;
  return 0;
}

```