#include <bits/stdc++.h>
using namespace std;
int N, K;
long long dp[55][55][2];
long long nCr[55][55];
void add(long long &a, long long x) {
  a += x;
  a %= 1000000007;
}
long long mult(long long a, long long b) { return (a * b) % 1000000007; }
long long invert2, invertN;
long long solve(int numNode, int numMax, int used) {
  if (numMax < 0) return 0;
  if (numNode <= 0) return 0;
  if (numNode == 1) {
    return numMax == 0 && used == 0;
  } else if (numNode == 2) {
    if (!used) return 0;
    if (numMax != 1) return 0;
    return 2;
  } else if (numNode == 3) {
    if (used) {
      if (numMax == 1)
        return 3;
      else
        return 0;
    } else {
      if (numMax == 1) return 6;
      return 0;
    }
  }
  if (dp[numNode][numMax][used] != -1) return dp[numNode][numMax][used];
  long long &a = dp[numNode][numMax][used];
  a = 0;
  if (used) {
    add(a, mult(numNode, solve(numNode - 1, numMax - 1, 0)));
    for (int left = 1; left <= numNode - 2; left++) {
      int right = numNode - 1 - left;
      if (right < left) break;
      for (int ml = 0; ml <= numMax - 1; ml++) {
        int mr = numMax - ml - 1;
        long long tempL = solve(left, ml, 0);
        long long tempR = solve(right, mr, 1);
        long long temp = mult(tempL, tempR);
        if (left == right) temp = mult(temp, invert2);
        add(a, mult(numNode, mult(nCr[numNode - 1][left], temp)));
        tempL = solve(left, ml, 1);
        tempR = solve(right, mr, 0);
        temp = mult(tempL, tempR);
        if (left == right) temp = mult(temp, invert2);
        add(a, mult(numNode, mult(nCr[numNode - 1][left], temp)));
        tempL = solve(left, ml, 0);
        tempR = solve(right, mr, 0);
        temp = mult(tempL, tempR);
        if (left == right) temp = mult(temp, invert2);
        add(a, mult(numNode, mult(nCr[numNode - 1][left], temp)));
      }
    }
  } else {
    add(a, mult(numNode, solve(numNode - 1, numMax, 1)));
    for (int left = 1; left <= numNode - 2; left++) {
      int right = numNode - 1 - left;
      if (right < left) break;
      for (int ml = 0; ml <= numMax; ml++) {
        int mr = numMax - ml;
        long long tempL = solve(left, ml, 1);
        long long tempR = solve(right, mr, 1);
        long long temp = mult(tempL, tempR);
        if (left == right) temp = mult(temp, invert2);
        add(a, mult(numNode, mult(nCr[numNode - 1][left], temp)));
      }
    }
  }
  return a;
}
long long inverse(long long a, long long b, long long *X, long long *Y) {
  if (b == 0) {
    *X = 1;
    *Y = 0;
    return a;
  } else {
    long long xx, yy;
    long long ret = inverse(b, a % b, &xx, &yy);
    *X = yy;
    *Y = xx - (a / b) * yy;
    return ret;
  }
}
int main() {
  nCr[0][0] = 1;
  nCr[1][0] = nCr[1][1] = 1;
  for (int i = 2; i < 55; i++) {
    nCr[i][0] = nCr[i][i] = 1;
    for (int j = 1; j < i; j++) {
      nCr[i][j] = nCr[i - 1][j] + nCr[i - 1][j - 1];
      nCr[i][j] %= 1000000007;
    }
  }
  for (int i = 0; i < 55; i++) {
    for (int j = 0; j < 55; j++) {
      dp[i][j][0] = dp[i][j][1] = -1;
    }
  }
  cin >> N >> K;
  invert2 = 500000004;
  long long x, y;
  inverse(N, 1000000007, &x, &y);
  invertN = (x + 1000000007) % 1000000007;
  long long a = solve(N, K, 0);
  long long b = solve(N, K, 1);
  cout << (((a + b) % 1000000007) * invertN) % 1000000007 << endl;
  return 0;
}

### Prompt

Develop a solution in Cpp to the problem described below:

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;
int N, K;
long long dp[55][55][2];
long long nCr[55][55];
void add(long long &a, long long x) {
  a += x;
  a %= 1000000007;
}
long long mult(long long a, long long b) { return (a * b) % 1000000007; }
long long invert2, invertN;
long long solve(int numNode, int numMax, int used) {
  if (numMax < 0) return 0;
  if (numNode <= 0) return 0;
  if (numNode == 1) {
    return numMax == 0 && used == 0;
  } else if (numNode == 2) {
    if (!used) return 0;
    if (numMax != 1) return 0;
    return 2;
  } else if (numNode == 3) {
    if (used) {
      if (numMax == 1)
        return 3;
      else
        return 0;
    } else {
      if (numMax == 1) return 6;
      return 0;
    }
  }
  if (dp[numNode][numMax][used] != -1) return dp[numNode][numMax][used];
  long long &a = dp[numNode][numMax][used];
  a = 0;
  if (used) {
    add(a, mult(numNode, solve(numNode - 1, numMax - 1, 0)));
    for (int left = 1; left <= numNode - 2; left++) {
      int right = numNode - 1 - left;
      if (right < left) break;
      for (int ml = 0; ml <= numMax - 1; ml++) {
        int mr = numMax - ml - 1;
        long long tempL = solve(left, ml, 0);
        long long tempR = solve(right, mr, 1);
        long long temp = mult(tempL, tempR);
        if (left == right) temp = mult(temp, invert2);
        add(a, mult(numNode, mult(nCr[numNode - 1][left], temp)));
        tempL = solve(left, ml, 1);
        tempR = solve(right, mr, 0);
        temp = mult(tempL, tempR);
        if (left == right) temp = mult(temp, invert2);
        add(a, mult(numNode, mult(nCr[numNode - 1][left], temp)));
        tempL = solve(left, ml, 0);
        tempR = solve(right, mr, 0);
        temp = mult(tempL, tempR);
        if (left == right) temp = mult(temp, invert2);
        add(a, mult(numNode, mult(nCr[numNode - 1][left], temp)));
      }
    }
  } else {
    add(a, mult(numNode, solve(numNode - 1, numMax, 1)));
    for (int left = 1; left <= numNode - 2; left++) {
      int right = numNode - 1 - left;
      if (right < left) break;
      for (int ml = 0; ml <= numMax; ml++) {
        int mr = numMax - ml;
        long long tempL = solve(left, ml, 1);
        long long tempR = solve(right, mr, 1);
        long long temp = mult(tempL, tempR);
        if (left == right) temp = mult(temp, invert2);
        add(a, mult(numNode, mult(nCr[numNode - 1][left], temp)));
      }
    }
  }
  return a;
}
long long inverse(long long a, long long b, long long *X, long long *Y) {
  if (b == 0) {
    *X = 1;
    *Y = 0;
    return a;
  } else {
    long long xx, yy;
    long long ret = inverse(b, a % b, &xx, &yy);
    *X = yy;
    *Y = xx - (a / b) * yy;
    return ret;
  }
}
int main() {
  nCr[0][0] = 1;
  nCr[1][0] = nCr[1][1] = 1;
  for (int i = 2; i < 55; i++) {
    nCr[i][0] = nCr[i][i] = 1;
    for (int j = 1; j < i; j++) {
      nCr[i][j] = nCr[i - 1][j] + nCr[i - 1][j - 1];
      nCr[i][j] %= 1000000007;
    }
  }
  for (int i = 0; i < 55; i++) {
    for (int j = 0; j < 55; j++) {
      dp[i][j][0] = dp[i][j][1] = -1;
    }
  }
  cin >> N >> K;
  invert2 = 500000004;
  long long x, y;
  inverse(N, 1000000007, &x, &y);
  invertN = (x + 1000000007) % 1000000007;
  long long a = solve(N, K, 0);
  long long b = solve(N, K, 1);
  cout << (((a + b) % 1000000007) * invertN) % 1000000007 << endl;
  return 0;
}

```