Problem: You are given a tree of n vertices. You are to select k (not necessarily distinct) simple paths in such a way that it is possible to split all edges of the tree into three sets: edges not contained in any path, edges that are a part of exactly one of these paths, and edges that are parts of all selected paths, and the latter set should be non-empty.

Compute the number of ways to select k paths modulo 998244353.

The paths are enumerated, in other words, two ways are considered distinct if there are such i (1 ≤ i ≤ k) and an edge that the i-th path contains the edge in one way and does not contain it in the other.

Input

The first line contains two integers n and k (1 ≤ n, k ≤ 10^{5}) — the number of vertices in the tree and the desired number of paths.

The next n - 1 lines describe edges of the tree. Each line contains two integers a and b (1 ≤ a, b ≤ n, a ≠ b) — the endpoints of an edge. It is guaranteed that the given edges form a tree.

Output

Print the number of ways to select k enumerated not necessarily distinct simple paths in such a way that for each edge either it is not contained in any path, or it is contained in exactly one path, or it is contained in all k paths, and the intersection of all paths is non-empty. 

As the answer can be large, print it modulo 998244353.

Examples

Input

3 2
1 2
2 3


Output

7


Input

5 1
4 1
2 3
4 5
2 1


Output

10


Input

29 29
1 2
1 3
1 4
1 5
5 6
5 7
5 8
8 9
8 10
8 11
11 12
11 13
11 14
14 15
14 16
14 17
17 18
17 19
17 20
20 21
20 22
20 23
23 24
23 25
23 26
26 27
26 28
26 29


Output

125580756

Note

In the first example the following ways are valid：

  * ((1,2), (1,2)), 
  * ((1,2), (1,3)), 
  * ((1,3), (1,2)), 
  * ((1,3), (1,3)), 
  * ((1,3), (2,3)), 
  * ((2,3), (1,3)), 
  * ((2,3), (2,3)). 



In the second example k=1, so all n ⋅ (n - 1) / 2 = 5 ⋅ 4 / 2 = 10 paths are valid.

In the third example, the answer is ≥ 998244353, so it was taken modulo 998244353, don't forget it!

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10, M = (1 << 18) + 10, mod = 998244353;
long long rd() {
  long long x = 0, w = 1;
  char ch = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + (ch ^ 48);
    ch = getchar();
  }
  return x * w;
}
int to[N << 1], nt[N << 1], hd[N], tot = 1;
void adde(int x, int y) {
  ++tot, to[tot] = y, nt[tot] = hd[x], hd[x] = tot;
  ++tot, to[tot] = x, nt[tot] = hd[y], hd[y] = tot;
}
void ad(int &x, int y) { x += y, x -= x >= mod ? mod : 0; }
int fpow(int a, int b) {
  int an = 1;
  while (b) {
    if (b & 1) an = 1ll * an * a % mod;
    a = 1ll * a * a % mod, b >>= 1;
  }
  return an;
}
int ginv(int a) { return fpow(a, mod - 2); }
int W[20], iW[20], rdr[M], pu[M], pv[M];
void ntt(int *a, int n, bool op) {
  int l = 0, y;
  while (1 << l < n) ++l;
  for (int i = 0; i < n; ++i) {
    rdr[i] = (rdr[i >> 1] >> 1) | ((i & 1) << (l - 1));
    if (i < rdr[i]) swap(a[i], a[rdr[i]]);
  }
  for (int i = 1, p = 0; i < n; i <<= 1, ++p) {
    int ww = op ? W[p] : iW[p];
    for (int j = 0; j < n; j += i << 1)
      for (int k = 0, w = 1; k < i; ++k, w = 1ll * w * ww % mod)
        y = 1ll * a[j + k + i] * w % mod,
        a[j + k + i] = (a[j + k] - y + mod) % mod,
        a[j + k] = (a[j + k] + y) % mod;
  }
  if (!op)
    for (int i = 0, w = ginv(n); i < n; ++i) a[i] = 1ll * a[i] * w % mod;
}
int n, k, ans, fac[N], iac[N], sz[N], f[N], sf[N];
vector<int> operator+(vector<int> a, vector<int> b) {
  vector<int> an;
  int nn = a.size(), mm = b.size(), ln = max(nn, mm);
  an.resize(ln);
  for (int i = 0; i < ln; ++i) {
    an[i] = 0;
    if (i < nn) ad(an[i], a[i]);
    if (i < mm) ad(an[i], b[i]);
  }
  return an;
}
vector<int> operator*(vector<int> a, vector<int> b) {
  vector<int> an;
  int nn = a.size(), mm = b.size(), len = 1;
  while (len <= nn + mm) len <<= 1;
  if (!nn || !mm) return an;
  an.resize(nn + mm - 1);
  if (1ll * nn * mm <= 1ll * (nn + mm) * 20) {
    for (int i = 0; i < nn; ++i)
      for (int j = 0; j < mm; ++j) ad(an[i + j], 1ll * a[i] * b[j] % mod);
  } else {
    for (int i = 0; i < nn; ++i) pu[i] = a[i];
    for (int i = 0; i < mm; ++i) pv[i] = b[i];
    ntt(pu, len, 1), ntt(pv, len, 1);
    for (int i = 0; i < len; ++i) pu[i] = 1ll * pu[i] * pv[i] % mod;
    ntt(pu, len, 0);
    for (int i = 0; i < nn + mm - 1; ++i) an[i] = pu[i];
    memset(pu, 0, sizeof(int) * len), memset(pv, 0, sizeof(int) * len);
  }
  return an;
}
vector<int> I, pa[N], nf, pb[N], ng;
vector<int> sov1(int l, int r) {
  if (l > r) return I;
  if (l == r) return pa[l];
  int mid = (l + r) >> 1;
  return sov1(l, mid) * sov1(mid + 1, r);
}
void sov2(int l, int r) {
  if (l >= r) return;
  int mid = (l + r) >> 1;
  sov2(l, mid), sov2(mid + 1, r);
  pb[l] = pb[l] * pa[mid + 1] + pb[mid + 1] * pa[l];
  pa[l] = pa[l] * pa[mid + 1];
}
int val(vector<int> a, int z) { return a[z]; }
int pt;
void dfs1(int x, int ffa) {
  sz[x] = 1;
  for (int i = hd[x]; i; i = nt[i]) {
    int y = to[i];
    if (y == ffa) continue;
    dfs1(y, x), sz[x] += sz[y];
    ad(sf[x], sf[y]);
  }
  pt = 0, pa[1].clear(), pb[1].clear();
  for (int i = hd[x]; i; i = nt[i]) {
    int y = to[i];
    if (y == ffa) continue;
    ++pt, pa[pt].clear(), pb[pt].clear();
    pa[pt].push_back(1), pa[pt].push_back(sz[y]), pb[pt].push_back(sf[y]);
  }
  nf = sov1(1, pt);
  int nn = nf.size();
  for (int i = 0; i < nn && i <= k; ++i)
    ad(f[x], 1ll * nf[i] * fac[k] % mod * iac[k - i] % mod);
  ad(sf[x], f[x]);
  sov2(1, pt);
  ng.clear(), ng.push_back(1), ng.push_back(n - sz[x]);
  ng = ng * pb[1];
  nn = ng.size();
  for (int i = 0; i < nn && i <= k; ++i)
    ad(ans, 1ll * ng[i] * fac[k] % mod * iac[k - i] % mod);
}
void dfs2(int x, int ffa, int sm) {
  ad(ans, 1ll * f[x] * (sm - sf[x] + mod) % mod);
  for (int i = hd[x]; i; i = nt[i]) {
    int y = to[i];
    if (y == ffa) continue;
    dfs2(y, x, (sm - f[x] + mod) % mod);
  }
}
int main() {
  for (int i = 1, p = 0; p < 19; i <<= 1, ++p)
    W[p] = fpow(3, (mod - 1) / (i << 1)), iW[p] = ginv(W[p]);
  fac[0] = 1;
  for (int i = 1; i <= N - 5; ++i) fac[i] = 1ll * fac[i - 1] * i % mod;
  iac[N - 5] = ginv(fac[N - 5]);
  for (int i = N - 5; i; --i) iac[i - 1] = 1ll * iac[i] * i % mod;
  I.push_back(1);
  n = rd(), k = rd();
  for (int i = 1; i < n; ++i) adde(rd(), rd());
  if (k == 1) {
    printf("%d\n", (int)(1ll * n * (n - 1) / 2 % mod));
    return 0;
  }
  dfs1(1, 0);
  ans = 2ll * ans % mod;
  dfs2(1, 0, sf[1]);
  ans = 1ll * ans * ginv(2) % mod;
  printf("%d\n", ans);
  return 0;
}