Problem: G: Tree

problem

Given a tree consisting of N vertices. Each vertex of the tree is numbered from 1 to N. Of the N-1 edges, the i \ (= 1, 2, ..., N-1) edge connects the vertex u_i and the vertex v_i.

Write a program to find the number of K non-empty subgraph sets of this tree, each of which is concatenated and no two different subgraphs share vertices. However, the answer can be very large, so answer the remainder divided by 998244353.

Note that if the set of K subgraphs is the same, the ones with different order of K subgraphs are also equated.

Input format


N K
u_1 v_1
::
u_ {N-1} v_ {N-1}


Constraint

* 2 \ leq N \ leq 10 ^ {5}
* 1 \ leq K \ leq min (N, 300)
* 1 \ leq u_i, v_i \ leq N
* u_i \ neq v_i
* For i \ neq j (u_i, v_i) \ neq (u_j, v_j)
* All inputs are given as integers.
* The graph given is guaranteed to be a tree.



Output format

Print the integer that represents the answer on one line. Note that it prints too much divided by 998244353.

Input example 1


3 2
1 2
13


Output example 1


Five

There are five ways:

* \\ {1 \\} and \\ {2 \\}
* \\ {1 \\} and \\ {3 \\}
* \\ {2 \\} and \\ {3 \\}
* \\ {1, 2 \\} and \\ {3 \\}
* \\ {1, 3 \\} and \\ {2 \\}



Input example 2


4 4
1 2
13
14


Output example 2


1

There is only one way (\\ {1 \\}, \\ {2 \\}, \\ {3 \\}, \\ {4 \\}).

Input example 3


7 4
1 7
twenty one
7 4
3 4
5 7
6 3


Output example 3


166





Example

Input

3 2
1 2
1 3


Output

5

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pi;
typedef pair<pi, pi> pp;
typedef pair<ll, ll> pl;
const double EPS = 1e-9;
const ll MOD = 998244353;
const int inf = 1 << 30;
const ll linf = 1LL << 60;

int N, K;
vector<int> e[100000];
ll vec[2][100000][301];
ll tmp[2][301] = {0};
int sz[100000];

void dfs(int v, int p) {
    rep(i,e[v].size()) {
        if (e[v][i] == p) continue;
        dfs(e[v][i], v);
    }
    vec[0][v][0] = 1;
    vec[1][v][1] = 1;
    sz[v] = 1;
    rep(i,e[v].size()) {
        if (e[v][i] == p) continue;
        memset(tmp, 0, sizeof(tmp));
        for (int j = sz[v]; j >= 0; j--) {
            for (int k = 0; k <= sz[e[v][i]]; k++) {
                if (j+k > K+1) break;
                if (k == K+1) continue;
                if (k+j != K+1) tmp[0][k+j] = (tmp[0][k+j] + vec[0][v][j] * (vec[0][e[v][i]][k] + vec[1][e[v][i]][k])) % MOD;
                if (k+j != K+1) tmp[1][k+j] = (tmp[1][k+j] + vec[1][v][j] * (vec[1][e[v][i]][k] + vec[0][e[v][i]][k])) % MOD;
                if (k+j != 0) tmp[1][k+j-1] = (tmp[1][k+j-1] + vec[1][v][j] * vec[1][e[v][i]][k]) % MOD;
            }
        }
        sz[v] = min(K, sz[v]+sz[e[v][i]]);
        rep(j,2) rep(k,sz[v]+1) vec[j][v][k] = tmp[j][k];
        /*
        cerr << "i: " << i << endl;
        cerr << sz[v] << " " << sz[e[v][i]] << endl;
        rep(j,2) { rep(k,K+1) {
            cerr << tmp[j][k] << " "; } cerr << endl;
        }
        */
    }
}

int main() {
    cin >> N >> K;
    rep(i,N-1) {
        int u, v; cin >> u >> v;
        u--; v--;
        e[u].push_back(v);
        e[v].push_back(u);
    }
    dfs(0, 0);
    cout << (vec[0][0][K] + vec[1][0][K]) % MOD << endl;
}