Problem: Hanh is a famous biologist. He loves growing trees and doing experiments on his own garden.

One day, he got a tree consisting of n vertices. Vertices are numbered from 1 to n. A tree with n vertices is an undirected connected graph with n-1 edges. Initially, Hanh sets the value of every vertex to 0.

Now, Hanh performs q operations, each is either of the following types: 

  * Type 1: Hanh selects a vertex v and an integer d. Then he chooses some vertex r uniformly at random, lists all vertices u such that the path from r to u passes through v. Hanh then increases the value of all such vertices u by d. 
  * Type 2: Hanh selects a vertex v and calculates the expected value of v. 



Since Hanh is good at biology but not math, he needs your help on these operations.

Input

The first line contains two integers n and q (1 ≤ n, q ≤ 150 000) — the number of vertices on Hanh's tree and the number of operations he performs.

Each of the next n - 1 lines contains two integers u and v (1 ≤ u, v ≤ n), denoting that there is an edge connecting two vertices u and v. It is guaranteed that these n - 1 edges form a tree.

Each of the last q lines describes an operation in either formats: 

  * 1 v d (1 ≤ v ≤ n, 0 ≤ d ≤ 10^7), representing a first-type operation. 
  * 2 v (1 ≤ v ≤ n), representing a second-type operation. 



It is guaranteed that there is at least one query of the second type.

Output

For each operation of the second type, write the expected value on a single line. 

Let M = 998244353, it can be shown that the expected value can be expressed as an irreducible fraction p/q, where p and q are integers and q not ≡ 0 \pmod{M}. Output the integer equal to p ⋅ q^{-1} mod M. In other words, output such an integer x that 0 ≤ x < M and x ⋅ q ≡ p \pmod{M}.

Example

Input


5 12
1 2
1 3
2 4
2 5
1 1 1
2 1
2 2
2 3
2 4
2 5
1 2 2
2 1
2 2
2 3
2 4
2 5


Output


1
199648871
399297742
199648871
199648871
598946614
199648873
2
2
2

Note

The image below shows the tree in the example:

<image>

For the first query, where v = 1 and d = 1: 

  * If r = 1, the values of all vertices get increased. 
  * If r = 2, the values of vertices 1 and 3 get increased. 
  * If r = 3, the values of vertices 1, 2, 4 and 5 get increased. 
  * If r = 4, the values of vertices 1 and 3 get increased. 
  * If r = 5, the values of vertices 1 and 3 get increased. 



Hence, the expected values of all vertices after this query are (1, 0.4, 0.8, 0.4, 0.4).

For the second query, where v = 2 and d = 2: 

  * If r = 1, the values of vertices 2, 4 and 5 get increased. 
  * If r = 2, the values of all vertices get increased. 
  * If r = 3, the values of vertices 2, 4 and 5 get increased. 
  * If r = 4, the values of vertices 1, 2, 3 and 5 get increased. 
  * If r = 5, the values of vertices 1, 2, 3 and 4 get increased. 



Hence, the expected values of all vertices after this query are (2.2, 2.4, 2, 2, 2).

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int MAXN = (int)1.5e5 + 10;
const int MOD = 998244353;
const int SQRT = 350;
int n, q, a[MAXN];
vector<int> adj[MAXN], child[MAXN];
vector<pair<int, int> > buffer;
int par[MAXN][MAXN / SQRT + 10];
int id[MAXN], sp[MAXN];
int n1;
int timer;
int x[MAXN], y[MAXN];
int c[MAXN];
int b[MAXN], f[MAXN];
struct rmq {
  int a[MAXN];
  int b[MAXN];
  int block(int i) { return (i - 1) / SQRT + 1; }
  void update(int l, int r, int v) {
    a[l] = (a[l] + v) % MOD;
    a[r + 1] = (a[r + 1] - v + MOD) % MOD;
    b[block(l)] = (b[block(l)] + v) % MOD;
    b[block(r + 1)] = (b[block(r + 1)] - v + MOD) % MOD;
  }
  int query(int i) {
    int l = 1, r = i;
    int ans = 0;
    if (block(l) == block(r)) {
      for (int i = l; i <= r; ++i) {
        ans = (ans + a[i]);
        if (ans >= MOD) {
          ans -= MOD;
        }
      }
      return ans;
    }
    int x = block(l) + 1;
    int y = block(r) - 1;
    for (int i = x; i <= y; ++i) {
      ans = (ans + b[i]);
      if (ans >= MOD) {
        ans -= MOD;
      }
    }
    for (int i = (x - 1) * SQRT; i >= l; --i) {
      ans += a[i];
      if (ans >= MOD) {
        ans -= MOD;
      }
    }
    for (int i = y * SQRT + 1; i <= r; ++i) {
      ans += a[i];
      if (ans >= MOD) {
        ans -= MOD;
      }
    }
    return ans;
  }
} rmq;
void dfs(int u, int p = -1) {
  x[u] = ++timer;
  c[u] = 1;
  for (int i = 0; i < (int)adj[u].size(); ++i) {
    int v = adj[u][i];
    if (v != p) {
      child[u].push_back(v);
      dfs(v, u);
      c[u] += c[v];
    }
  }
  y[u] = timer;
}
bool is_ancestor(int u, int v) { return x[u] <= x[v] && x[v] <= y[u]; }
int power(int a, int k) {
  int ans = 1;
  while (k) {
    if (k & 1) {
      ans = (long long)ans * a % MOD;
    }
    a = (long long)a * a % MOD;
    k >>= 1;
  }
  return ans;
}
int find_ancestor(int v, int u) {
  int l = 0, r = (int)child[v].size() - 1, f = -1;
  while (l <= r) {
    int mid = (l + r) >> 1;
    int p = child[v][mid];
    if (x[p] <= x[u]) {
      f = mid;
      l = mid + 1;
    } else {
      r = mid - 1;
    }
  }
  return child[v][f];
}
void update(int &a, int b) {
  a += b;
  if (a >= MOD) {
    a -= MOD;
  } else if (a < 0) {
    a += MOD;
  }
}
void update(int l, int r, int v) {
  update(f[l], v);
  update(f[r + 1], -v);
}
void update_all() {
  for (int i = 1; i <= n; ++i) {
    b[i] = 0;
    f[i] = 0;
    rmq.a[i] = 0;
    rmq.b[i] = 0;
  }
  for (int i = 0; i < (int)buffer.size(); ++i) {
    int v = buffer[i].first;
    int d = buffer[i].second;
    update(b[v], d);
  }
  for (int u = 1; u <= n; ++u) {
    for (int v : child[u]) {
      update(x[v], y[v], (long long)b[u] * (n - c[v]) % MOD);
    }
    update(x[u], x[u], (long long)b[u] * n % MOD);
    if (u != 1) {
      if (1 < x[u]) {
        update(1, x[u] - 1, (long long)b[u] * c[u] % MOD);
      }
      if (y[u] < n) {
        update(y[u] + 1, n, (long long)b[u] * c[u] % MOD);
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    update(f[i], f[i - 1]);
  }
  for (int u = 1; u <= n; ++u) {
    update(a[u], f[x[u]]);
  }
  buffer.clear();
}
int query(int u, int cnt_before) {
  int ans = (a[u] + rmq.query(x[u])) % MOD;
  for (int i = 0; i < (int)buffer.size(); ++i) {
    int v = buffer[i].first;
    int d = buffer[i].second;
    int cnt;
    if (u == v) {
      cnt = n;
    } else if (is_ancestor(v, u)) {
      if (id[v] == 0) {
        cnt = 0;
      } else {
        cnt = n - c[par[u][id[v]]];
      }
    } else {
      cnt = c[v];
    }
    ans = (ans + (long long)cnt * d) % MOD;
  }
  return (long long)ans * n1 % MOD;
}
void dfs2(int u, int id, int val) {
  par[u][id] = val;
  for (int v : child[u]) {
    dfs2(v, id, val);
  }
}
int main() {
  scanf("%d%d", &n, &q);
  for (int i = 1; i <= n - 1; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  n1 = power(n, MOD - 2);
  dfs(1);
  int cnt = 0;
  for (int i = 1; i <= n; ++i) {
    if (child[i].size() > SQRT) {
      id[i] = ++cnt;
      sp[cnt] = i;
    }
  }
  for (int i = 1; i <= cnt; ++i) {
    for (int v : child[sp[i]]) {
      dfs2(v, i, v);
    }
  }
  for (int i = 1; i <= n; ++i) {
    a[i] = 0;
  }
  for (int cnt = 0; q--;) {
    int type;
    scanf("%d", &type);
    if (type == 1) {
      int v, d;
      scanf("%d%d", &v, &d);
      if (id[v] == 0) {
        for (int u : child[v]) {
          rmq.update(x[u], y[u], (long long)d * (n - c[u]) % MOD);
        }
      }
      buffer.push_back(pair<int, int>(v, d));
      cnt += 1;
    } else {
      int v;
      scanf("%d", &v);
      printf("%d\n", query(v, cnt));
    }
    if (buffer.size() == SQRT) {
      update_all();
    }
  }
  return 0;
}