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>
using namespace std;

using VI = vector<int>;
using VVI = vector<VI>;
using PII = pair<int, int>;
using LL = long long;
using VL = vector<LL>;
using VVL = vector<VL>;
using PLL = pair<LL, LL>;
using VS = vector<string>;

#define ALL(a)  begin((a)),end((a))
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define MT make_tuple
#define SZ(a) int((a).size())
#define SORT(c) sort(ALL((c)))
#define RSORT(c) sort(RALL((c)))
#define UNIQ(c) (c).erase(unique(ALL((c))), end((c)))

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

#define FF first
#define SS second

#define DUMP(x) cout<<#x<<":"<<(x)<<endl
template<class S, class T>
istream& operator>>(istream& is, pair<S,T>& p){
  return is >> p.FF >> p.SS;
}
template<class T>
istream& operator>>(istream& is, vector<T>& xs){
  for(auto& x: xs)
	is >> x;
  return is;
}
template<class S, class T>
ostream& operator<<(ostream& os, const pair<S,T>& p){
  return os << p.FF << " " << p.SS;
}
template<class T>
ostream& operator<<(ostream& os, const vector<T>& xs){
  for(unsigned int i=0;i<xs.size();++i)
	os << (i?" ":"") << xs[i];
  return os;
}
template<class T>
void maxi(T& x, T y){
  if(x < y) x = y;
}
template<class T>
void mini(T& x, T y){
  if(x > y) x = y;
}
void debug(istringstream&){}
template <char sep=',', class Head, class... Tail>
void debug(istringstream& iss, Head&& head, Tail&&... tail)
{
  string name;
  getline(iss, name, ',');
  cout << sep << name << "=" << head;
  debug(iss, forward<Tail>(tail)...);
}
#define DEBUG(...) \
  do{ \
    istringstream ss(#__VA_ARGS__); \
    debug<' '>(ss, __VA_ARGS__); \
    cout<<endl; \
  }while(0)


const double EPS = 1e-10;
const double PI  = acos(-1.0);
const LL MOD = 998244353;


const int MAXU = 100000 + 10;
const int MAXK = 300 + 10;
LL dp[2][MAXU][MAXK];
int sz[MAXU];

void add(LL& x, LL y){
    x += y;
    if(x >= MOD) x -= MOD;
}


LL solve(VVI& G, int K, int u, int p){
  sz[u] = 1;

  int ub = 2;
  VL nouse_crt(ub);
  VL use_crt(ub);
  nouse_crt[0] = 1;
  use_crt[1] = 1;

  for(int to : G[u]){
    if(to == p) continue;
    solve(G, K, to, u);

    int ksum = min(K, sz[u]);
    ub = min(K+10, ksum+sz[to]+2);
    VL nouse_nxt(ub);
    VL use_nxt(ub);

    for(int k1=0;k1<=ksum;++k1){
      for(int k2=0;k2<=sz[to] && k1+k2<=K+1;++k2){
        add(nouse_nxt[k1+k2], nouse_crt[k1] * dp[0][to][k2] % MOD);
        if(k2) add(nouse_nxt[k1+k2], nouse_crt[k1] * dp[1][to][k2] % MOD);

        add(use_nxt[k1+k2], use_crt[k1] * dp[0][to][k2] % MOD);
        if(k2) add(use_nxt[k1+k2-1], use_crt[k1] * dp[1][to][k2] % MOD);
        if(k2) add(use_nxt[k1+k2], use_crt[k1] * dp[1][to][k2] % MOD);
      }
    }
    
    sz[u] += sz[to];
    swap(nouse_crt, nouse_nxt);
    swap(use_crt, use_nxt);
  }

  REP(kk,ub){
    dp[0][u][kk] = nouse_crt[kk];
    dp[1][u][kk] = use_crt[kk];
  }

/*
  DEBUG(u);
  REP(i,2){
    cout << "use = " << i << endl;
    REP(kk,K+1){ cout << dp[i][u][kk] << " ";}
    cout << endl;
  }
  cout << "=================" << endl;
*/
  return (dp[0][u][K] + dp[1][u][K]) % MOD;
}


int main(){
  cin.tie(0);
  ios_base::sync_with_stdio(false);

  int N, K;
  cin >> N >> K;
  VVI G(N);
  REP(i,N-1){
    int u, v;
    cin >> u >> v;
    --u;
    --v;
    G[u].PB(v);
    G[v].PB(u);
  }

  cout << solve(G, K, 0, -1) << endl;

  return 0;
}