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;
int head[100010], nxt[100010 * 2], a[100010 * 2], edge, size[100010],
    sum[100010], value[100010], pre[100010], cur[100010];
int pos[100010], k, fac[100010], inv[100010], A[200010], B[200010], C[200010],
    rev[200010], omega[200010], res, n;
vector<int> p[100010 * 4];
pair<int, int> son[100010];
int read() {
  int tmp = 0;
  char c = getchar();
  while (c < '0' || c > '9') c = getchar();
  while (c >= '0' && c <= '9') {
    tmp = tmp * 10 + c - '0';
    c = getchar();
  }
  return tmp;
}
void create(int u, int v) {
  edge++;
  a[edge] = v;
  nxt[edge] = head[u];
  head[u] = edge;
}
int calc_A(int n, int m) { return (long long)fac[n] * inv[n - m] % 998244353; }
int calc(int a, int k) {
  int ans = 1;
  while (k) {
    if (k % 2) ans = (long long)ans * a % 998244353;
    a = (long long)a * a % 998244353;
    k /= 2;
  }
  return ans;
}
void fft(int *a, int n) {
  for (int i = 0; i <= n - 1; i++)
    if (rev[i] > i) swap(a[i], a[rev[i]]);
  for (int l = 2; l <= n; l *= 2) {
    int m = l / 2;
    for (int *p = a; p != a + n; p += l)
      for (int i = 0; i <= m - 1; i++) {
        int tmp = (long long)p[i + m] * omega[n / l * i] % 998244353;
        p[i + m] = (p[i] - tmp + 998244353) % 998244353;
        p[i] = (p[i] + tmp) % 998244353;
      }
  }
}
void solve(int now, int l, int r) {
  p[now].clear();
  if (l == r) {
    p[now].push_back(1);
    p[now].push_back(value[l]);
    return;
  }
  int mid = (l + r) / 2, len1, len2;
  solve(now * 2, l, mid);
  solve(now * 2 + 1, mid + 1, r);
  len1 = mid - l + 1;
  len2 = r - mid;
  for (int i = 0; i <= len1; i++) A[i] = p[now * 2][i];
  for (int i = 0; i <= len2; i++) B[i] = p[now * 2 + 1][i];
  int tmp = 1, lg = 0;
  while (tmp <= len1 + len2) {
    tmp *= 2;
    lg++;
  }
  for (int i = 0; i <= tmp - 1; i++) {
    int cur = i;
    rev[i] = 0;
    for (int j = 1; j <= lg; j++) {
      rev[i] = rev[i] * 2 + cur % 2;
      cur /= 2;
    }
  }
  omega[0] = 1;
  omega[1] = calc(3, (998244353 - 1) / tmp);
  for (int i = 2; i <= tmp - 1; i++)
    omega[i] = (long long)omega[i - 1] * omega[1] % 998244353;
  fft(A, tmp);
  fft(B, tmp);
  omega[1] = calc(omega[1], 998244353 - 2);
  for (int i = 2; i <= tmp - 1; i++)
    omega[i] = (long long)omega[i - 1] * omega[1] % 998244353;
  for (int i = 0; i <= tmp - 1; i++) C[i] = (long long)A[i] * B[i] % 998244353;
  fft(C, tmp);
  int INV = calc(tmp, 998244353 - 2);
  for (int i = 0; i <= len1 + len2; i++)
    p[now].push_back((long long)C[i] * INV % 998244353);
  for (int i = 0; i <= tmp - 1; i++) A[i] = B[i] = C[i] = 0;
}
void dfs(int u, int fa) {
  size[u] = 1;
  for (int i = head[u]; i; i = nxt[i]) {
    int v = a[i];
    if (v != fa) {
      dfs(v, u);
      size[u] += size[v];
    }
  }
  int cnt = 0, tmp = 0, cnt_son = 0;
  for (int i = head[u]; i; i = nxt[i]) {
    int v = a[i];
    if (v != fa) {
      res = (res + (long long)tmp * sum[v] % 998244353) % 998244353;
      tmp = (tmp + sum[v]) % 998244353;
      son[++cnt_son] = make_pair(size[v], v);
      value[++cnt] = size[v];
    } else
      value[++cnt] = n - size[u];
  }
  solve(1, 1, cnt);
  for (int i = 0; i <= cnt; i++) pre[i] = p[1][i];
  sort(son + 1, son + cnt_son + 1);
  int g;
  for (int i = 1; i <= cnt_son; i++) {
    if (i == 1 || son[i].first != son[i - 1].first) {
      for (int j = 0; j <= cnt - 1; j++) {
        cur[j] = pre[j];
        if (j)
          cur[j] =
              ((cur[j] - (long long)cur[j - 1] * son[i].first % 998244353) %
                   998244353 +
               998244353) %
              998244353;
      }
      g = 0;
      for (int j = 0; j <= min(cnt - 1, k); j++) {
        if (k == 1 && j == 1) continue;
        g = (g + (long long)cur[j] * calc_A(k, j) % 998244353) % 998244353;
      }
    }
    res = (res + (long long)sum[son[i].second] * g % 998244353) % 998244353;
    sum[u] = (sum[u] + sum[son[i].second]) % 998244353;
  }
  g = 0;
  for (int j = 0; j <= cnt - 1; j++) {
    cur[j] = pre[j];
    if (j)
      cur[j] = ((cur[j] - (long long)cur[j - 1] * (n - size[u]) % 998244353) %
                    998244353 +
                998244353) %
               998244353;
  }
  for (int j = 0; j <= min(cnt - 1, k); j++) {
    if (k == 1 && j == 1) continue;
    g = (g + (long long)cur[j] * calc_A(k, j) % 998244353) % 998244353;
  }
  sum[u] = (sum[u] + g) % 998244353;
}
int main() {
  n = read();
  k = read();
  if (n == 1) {
    puts("0");
    return 0;
  }
  fac[0] = 1;
  for (int i = 1; i <= k; i++) fac[i] = (long long)fac[i - 1] * i % 998244353;
  inv[k] = calc(fac[k], 998244353 - 2);
  for (int i = k - 1; i >= 0; i--)
    inv[i] = (long long)inv[i + 1] * (i + 1) % 998244353;
  for (int i = 1; i <= n - 1; i++) {
    int u = read(), v = read();
    create(u, v);
    create(v, u);
  }
  dfs(1, 0);
  printf("%d\n", res);
  return 0;
}