#include <bits/stdc++.h>
using namespace std;
long long int n, k;
long long int ans[55][55][55];
long long int max(long long int a, long long int b) {
  if (a > b) return a;
  return b;
}
long long int pow(long long int n, long long int k) {
  if (k == 1) return n;
  if (k % 2 == 1) {
    long long int q = pow(n, k - 1);
    return (q * n) % 1000000007LL;
  } else {
    return pow((n * n) % 1000000007LL, k / 2);
  }
}
int dy[] = {-1LL, 0LL, 1LL};
long long int ckn[55][55];
int main() {
  cin >> n >> k;
  ckn[1][0] = ckn[1][1] = 1;
  for (long long int i = 2; i <= n; i++) {
    ckn[i][0] = 1;
    for (long long int j = 1; j <= i; j++) {
      ckn[i][j] = ckn[i - 1][j - 1] + ckn[i - 1][j];
      ckn[i][j] %= 1000000007LL;
    }
  }
  memset(ans, sizeof(ans), 0);
  ans[1][0][0] = 1;
  long long int delta;
  for (long long int i = 2; i <= n; i++) {
    for (long long int x1 = 0; x1 <= (i - 1) / 2; x1++) {
      for (long long int j = 0; j < 3; j++) {
        long long int y1 = x1 + dy[j];
        if (y1 < 0) continue;
        long long int x = y1 + 1;
        long long int y = max(x1, y1);
        ans[i][x][y] += (ans[i - 1][x1][y1]) * i;
        ans[i][x][y] %= 1000000007LL;
      }
    }
    for (long long int z = 1; z <= (i - 1) / 2; z++) {
      for (long long int x1 = 0; x1 <= z / 2; x1++) {
        for (long long int x2 = 0; x2 <= (i - 1 - z) / 2; x2++) {
          for (long long int j1 = 0; j1 < 3; j1++) {
            long long int y1 = x1 + dy[j1];
            if (y1 < 0) continue;
            for (long long int j2 = 0; j2 < 3; j2++) {
              long long int y2 = x2 + dy[j2];
              if (y2 < 0) continue;
              if (z == (i - 1 - z) && x2 > x1) continue;
              if (z == (i - 1 - z) && x2 == x1 && y2 > y1) continue;
              long long int x = max(1 + y1 + max(x2, y2), 1 + y2 + max(x1, y1));
              long long int y = max(x1, y1) + max(x2, y2);
              delta = ans[z][x1][y1] * ans[i - 1 - z][x2][y2];
              delta %= 1000000007LL;
              delta *= i;
              delta %= 1000000007LL;
              delta *= ckn[i - 1][z];
              delta %= 1000000007LL;
              if (z == (i - 1 - z) && x1 == x2 && y1 == y2) {
                delta *= ((1000000007LL + 1LL) / 2LL);
                delta %= 1000000007LL;
              }
              ans[i][x][y] += delta;
              ans[i][x][y] %= 1000000007LL;
            }
          }
        }
      }
    }
  }
  long long int res = ans[n][k - 1][k] + ans[n][k][k] + ans[n][k][k - 1];
  res *= pow(n, 1000000007LL - 2);
  res %= 1000000007LL;
  cout << res << endl;
  return 0;
}

### Prompt

Your task is to create 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;
long long int n, k;
long long int ans[55][55][55];
long long int max(long long int a, long long int b) {
  if (a > b) return a;
  return b;
}
long long int pow(long long int n, long long int k) {
  if (k == 1) return n;
  if (k % 2 == 1) {
    long long int q = pow(n, k - 1);
    return (q * n) % 1000000007LL;
  } else {
    return pow((n * n) % 1000000007LL, k / 2);
  }
}
int dy[] = {-1LL, 0LL, 1LL};
long long int ckn[55][55];
int main() {
  cin >> n >> k;
  ckn[1][0] = ckn[1][1] = 1;
  for (long long int i = 2; i <= n; i++) {
    ckn[i][0] = 1;
    for (long long int j = 1; j <= i; j++) {
      ckn[i][j] = ckn[i - 1][j - 1] + ckn[i - 1][j];
      ckn[i][j] %= 1000000007LL;
    }
  }
  memset(ans, sizeof(ans), 0);
  ans[1][0][0] = 1;
  long long int delta;
  for (long long int i = 2; i <= n; i++) {
    for (long long int x1 = 0; x1 <= (i - 1) / 2; x1++) {
      for (long long int j = 0; j < 3; j++) {
        long long int y1 = x1 + dy[j];
        if (y1 < 0) continue;
        long long int x = y1 + 1;
        long long int y = max(x1, y1);
        ans[i][x][y] += (ans[i - 1][x1][y1]) * i;
        ans[i][x][y] %= 1000000007LL;
      }
    }
    for (long long int z = 1; z <= (i - 1) / 2; z++) {
      for (long long int x1 = 0; x1 <= z / 2; x1++) {
        for (long long int x2 = 0; x2 <= (i - 1 - z) / 2; x2++) {
          for (long long int j1 = 0; j1 < 3; j1++) {
            long long int y1 = x1 + dy[j1];
            if (y1 < 0) continue;
            for (long long int j2 = 0; j2 < 3; j2++) {
              long long int y2 = x2 + dy[j2];
              if (y2 < 0) continue;
              if (z == (i - 1 - z) && x2 > x1) continue;
              if (z == (i - 1 - z) && x2 == x1 && y2 > y1) continue;
              long long int x = max(1 + y1 + max(x2, y2), 1 + y2 + max(x1, y1));
              long long int y = max(x1, y1) + max(x2, y2);
              delta = ans[z][x1][y1] * ans[i - 1 - z][x2][y2];
              delta %= 1000000007LL;
              delta *= i;
              delta %= 1000000007LL;
              delta *= ckn[i - 1][z];
              delta %= 1000000007LL;
              if (z == (i - 1 - z) && x1 == x2 && y1 == y2) {
                delta *= ((1000000007LL + 1LL) / 2LL);
                delta %= 1000000007LL;
              }
              ans[i][x][y] += delta;
              ans[i][x][y] %= 1000000007LL;
            }
          }
        }
      }
    }
  }
  long long int res = ans[n][k - 1][k] + ans[n][k][k] + ans[n][k][k - 1];
  res *= pow(n, 1000000007LL - 2);
  res %= 1000000007LL;
  cout << res << endl;
  return 0;
}

```