#include<bits/stdc++.h>
using namespace std;
using Int = long long;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}


struct FastIO{
  FastIO(){
    cin.tie(0);
    ios::sync_with_stdio(0);
  }
}fastio_beet;


template<typename F>
struct FixPoint : F{
  FixPoint(F&& f):F(forward<F>(f)){}
  template<typename... Args>
  decltype(auto) operator()(Args&&... args) const{
    return F::operator()(*this,forward<Args>(args)...);
  }
};
template<typename F>
inline decltype(auto) MFP(F&& f){
  return FixPoint<F>{forward<F>(f)};
}


template<typename T,T MOD = 1000000007>
struct Mint{
  static constexpr T mod = MOD;
  T v;
  Mint():v(0){}
  Mint(signed v):v(v){}
  Mint(long long t){v=t%MOD;if(v<0) v+=MOD;}

  Mint pow(long long k){
    Mint res(1),tmp(v);
    while(k){
      if(k&1) res*=tmp;
      tmp*=tmp;
      k>>=1;
    }
    return res;
  }

  static Mint add_identity(){return Mint(0);}
  static Mint mul_identity(){return Mint(1);}

  Mint inv(){return pow(MOD-2);}

  Mint& operator+=(Mint a){v+=a.v;if(v>=MOD)v-=MOD;return *this;}
  Mint& operator-=(Mint a){v+=MOD-a.v;if(v>=MOD)v-=MOD;return *this;}
  Mint& operator*=(Mint a){v=1LL*v*a.v%MOD;return *this;}
  Mint& operator/=(Mint a){return (*this)*=a.inv();}

  Mint operator+(Mint a) const{return Mint(v)+=a;};
  Mint operator-(Mint a) const{return Mint(v)-=a;};
  Mint operator*(Mint a) const{return Mint(v)*=a;};
  Mint operator/(Mint a) const{return Mint(v)/=a;};

  Mint operator-() const{return v?Mint(MOD-v):Mint(v);}

  bool operator==(const Mint a)const{return v==a.v;}
  bool operator!=(const Mint a)const{return v!=a.v;}
  bool operator <(const Mint a)const{return v <a.v;}
};
template<typename T,T MOD> constexpr T Mint<T, MOD>::mod;
template<typename T,T MOD>
ostream& operator<<(ostream &os,Mint<T, MOD> m){os<<m.v;return os;}

//INSERT ABOVE HERE
signed main(){
  Int n,k;
  cin>>n>>k;
  vector< vector<Int> > G(n);
  for(Int i=1;i<n;i++){
    Int u,v;
    cin>>u>>v;
    u--;v--;
    G[u].emplace_back(v);
    G[v].emplace_back(u);
  }
  using M = Mint<Int, 998244353>;
  vector< vector<M> > dp1(n); // connected to v
  vector< vector<M> > dp2(n); // not connected

  vector<Int> sz(n);
  MFP([&](auto dfs,Int v,Int p)->void{
        sz[v]=1;
        dp1[v].assign(sz[v]+1,M(0));
        dp2[v].assign(sz[v]+1,M(0));
        dp1[v][1]=M(1);
        dp2[v][0]=M(1);

        for(Int u:G[v]){
          if(u==p) continue;
          dfs(u,v);
          vector<M> nx1(sz[v]+sz[u]+1);
          vector<M> nx2(sz[v]+sz[u]+1);
          for(Int i=0;i<=sz[v];i++){
            for(Int j=0;j<=sz[u];j++){
              // cut
              nx1[i+j]+=dp1[v][i]*dp1[u][j];
              nx1[i+j]+=dp1[v][i]*dp2[u][j];
              nx2[i+j]+=dp2[v][i]*dp1[u][j];
              nx2[i+j]+=dp2[v][i]*dp2[u][j];

              // link
              if(i+j>0) nx1[i+j-1]+=dp1[v][i]*dp1[u][j];
            }
          }
          sz[v]+=sz[u];
          dp1[v]=nx1;
          dp2[v]=nx2;
          if(sz[v]>k){
            sz[v]=k;
            dp1[v].resize(k+1);
            dp2[v].resize(k+1);
          }
        }
      })(0,-1);

  cout<<dp1[0][k]+dp2[0][k]<<endl;
  return 0;
}



Measured memory_bytes: 507060