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 MOD = 998244353;
int mpow(long long base, int exp) {
  long long res = 1;
  while (exp) {
    if (exp & 1) {
      res *= base;
      res %= MOD;
    }
    base *= base;
    base %= MOD;
    exp >>= 1;
  }
  return res;
}
int minv(int base) {
  assert(base);
  return mpow(base, MOD - 2);
}
int mult(int a, int b) { return 1LL * a * b % MOD; }
int add(int a, int b) {
  a += b;
  if (a >= MOD) a -= MOD;
  return a;
}
int sub(int a, int b) {
  a -= b;
  if (a < 0) a += MOD;
  return a;
}
int madd(int& a, int b) {
  a += b;
  if (a >= MOD) a -= MOD;
  return a;
}
int madd(long long& a, int b) {
  a += b;
  if (a >= MOD) a -= MOD;
  return a;
}
int msub(int& a, int b) {
  a -= b;
  if (a < 0) a += MOD;
  return a;
}
int msub(long long& a, int b) {
  a -= b;
  if (a < 0) a += MOD;
  return a;
}
template <class T>
struct SparseTable {
  std::vector<T> v;
  std::vector<std::vector<int>> jump;
  int level(int x) { return 31 - __builtin_clz(x); }
  int comb(int a, int b) {
    return v[a] == v[b] ? std::min(a, b) : (v[a] < v[b] ? a : b);
  }
  void init(const std::vector<T>& _v) {
    v = _v;
    jump = {std::vector<int>((int)v.size())};
    iota(jump[0].begin(), jump[0].end(), 0);
    for (int j = 1; (1 << j) <= (int)v.size(); j++) {
      jump.push_back(std::vector<int>((int)v.size() - (1 << j) + 1));
      for (int i = 0; i < (int)jump[j].size(); i++) {
        jump[j][i] = comb(jump[j - 1][i], jump[j - 1][i + (1 << (j - 1))]);
      }
    }
  }
  int index(int l, int r) {
    assert(l <= r);
    int d = level(r - l + 1);
    return comb(jump[d][l], jump[d][r - (1 << d) + 1]);
  }
  T query(int l, int r) { return v[index(l, r)]; }
};
struct LCARMQ {
  int n;
  std::vector<std::vector<int>> adj;
  std::vector<int> dep, in, par, rev, out;
  std::vector<std::pair<int, int>> tmp;
  SparseTable<std::pair<int, int>> S;
  std::vector<std::vector<int>> sparse;
  int ti = 0;
  void init(int _n) {
    n = _n;
    adj.resize(n);
    dep = in = out = par = rev = std::vector<int>(n);
    sparse = {std::vector<int>(n)};
    for (int j = 1; (1 << j) <= n; j++) {
      sparse.push_back(std::vector<int>(n - (1 << j) + 1));
    }
  }
  void ae(int u, int v) {
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  void dfs(int src) {
    in[src] = ti++;
    sparse[0][in[src]] = src;
    tmp.emplace_back(dep[src], src);
    for (auto& nxt : adj[src]) {
      if (nxt == par[src]) continue;
      dep[nxt] = dep[par[nxt] = src] + 1;
      dfs(nxt);
      tmp.emplace_back(dep[src], src);
    }
    out[src] = ti;
  }
  inline int mini(int u, int v) {
    return (dep[u] < dep[v] || (dep[u] == dep[v] && in[u] > in[v])) ? u : v;
  }
  void gen(int root = 0) {
    par[root] = root;
    dfs(root);
    for (int j = 1; j < (int)sparse.size(); j++) {
      for (int i = 0; i < (int)sparse[j].size(); i++) {
        sparse[j][i] =
            mini(sparse[j - 1][i], sparse[j - 1][i + (1 << (j - 1))]);
      }
    }
  }
  int lca(int u, int v) {
    u = in[u];
    v = in[v];
    if (u > v) std::swap(u, v);
    return S.query(u, v).second;
  }
  int dist(int u, int v) { return dep[u] + dep[v] - 2 * dep[lca(u, v)]; }
  bool is_ancestor(int anc, int src) {
    return in[anc] <= in[src] && out[anc] >= out[src];
  }
  int get_child(int anc, int src) {
    if (!is_ancestor(anc, src)) return -1;
    int l = in[anc] + 1;
    int r = in[src];
    int d = 31 - __builtin_clz(r - l + 1);
    return mini(sparse[d][l], sparse[d][r - (1 << d) + 1]);
  }
  std::vector<std::pair<int, int>> compress(std::vector<int> nodes) {
    auto cmp = [&](int a, int b) { return in[a] < in[b]; };
    sort(nodes.begin(), nodes.end(), cmp);
    for (int i = int(nodes.size()) - 2; i >= 0; i--) {
      nodes.push_back(lca(nodes[i], nodes[i + 1]));
    }
    sort(nodes.begin(), nodes.end(), cmp);
    nodes.erase(unique(nodes.begin(), nodes.end()), nodes.end());
    std::vector<std::pair<int, int>> ret{{0, nodes[0]}};
    for (int i = 0; i < int(nodes.size()); i++) {
      rev[nodes[i]] = i;
    }
    for (int i = 1; i < int(nodes.size()); i++) {
      ret.emplace_back(rev[lca(nodes[i - 1], nodes[i])], nodes[i]);
    }
    return ret;
  }
};
const int B = 1300;
const int N = 1.5e5 + 5;
map<int, long long> que;
long long g[N], first[N];
vector<int> adj[N];
void update(int src, int par) {
  madd(g[src], first[src]);
  for (int nxt : adj[src]) {
    if (nxt == par) continue;
    madd(first[nxt], first[src]);
    update(nxt, src);
  }
};
int main() {
  cin.tie(0)->sync_with_stdio(0);
  int n, q;
  cin >> n >> q;
  LCARMQ L;
  L.init(n);
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    u--, v--;
    adj[u].emplace_back(v);
    adj[v].emplace_back(u);
    L.ae(u, v);
  }
  L.gen(0);
  vector<int> sub(n);
  function<void(int, int)> dfs_process = [&](int src, int par) {
    sub[src] = 1;
    for (int nxt : adj[src]) {
      if (nxt == par) continue;
      dfs_process(nxt, src);
      sub[src] += sub[nxt];
    }
  };
  dfs_process(0, -1);
  int ii = minv(n);
  for (int qq = 0; qq < q; qq++) {
    int type;
    cin >> type;
    if (type == 1) {
      long long v, d;
      cin >> v >> d;
      v--;
      madd(g[v], d * n % MOD);
      madd(que[v], d);
    } else {
      int v;
      cin >> v;
      v--;
      long long ans = g[v];
      for (auto u : que) {
        if (u.first != v) {
          int ch = L.get_child(u.first, v);
          if (ch == -1) {
            madd(ans, u.second * sub[u.first] % MOD);
          } else {
            madd(ans, u.second * (n - sub[ch]) % MOD);
          }
        }
      }
      cout << ans * ii % MOD << '\n';
    }
    if ((int)(que).size() > B) {
      for (int i = 0; i < n; i++) first[i] = 0;
      for (auto u : que) {
        madd(first[0], u.second * sub[u.first] % MOD);
        msub(first[u.first], u.second * sub[u.first] % MOD);
        for (int v : adj[u.first]) {
          if (L.is_ancestor(u.first, v)) {
            madd(first[v], u.second * (n - sub[v]) % MOD);
          }
        }
      }
      update(0, -1);
      que.clear();
    }
  }
  return 0;
}