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>
#pragma comment(linker, "/STACK:512000000")
using namespace std;
using li = long long;
using ld = long double;
void solve(bool);
void precalc();
clock_t start;
int main() {
  start = clock();
  int t = 1;
  cout.sync_with_stdio(0);
  cin.tie(0);
  cout.precision(20);
  cout << fixed;
  precalc();
  while (t--) {
    solve(true);
  }
  cout.flush();
  return 0;
}
template <typename T>
T binpow(T q, T w, T mod) {
  if (!w) return 1 % mod;
  if (w & 1) return q * 1LL * binpow(q, w - 1, mod) % mod;
  return binpow(q * 1LL * q % mod, w / 2, mod);
}
template <typename T>
T gcd(T q, T w) {
  while (w) {
    q %= w;
    swap(q, w);
  }
  return q;
}
template <typename T>
T lcm(T q, T w) {
  return q / gcd(q, w) * w;
}
template <typename T>
void make_unique(vector<T>& vec) {
  sort(vec.begin(), vec.end());
  vec.erase(unique(vec.begin(), vec.end()), vec.end());
}
template <typename T>
void relax_min(T& cur, T val) {
  cur = min(cur, val);
}
template <typename T>
void relax_max(T& cur, T val) {
  cur = max(cur, val);
}
mt19937 rng(
    (unsigned long long)chrono::steady_clock::now().time_since_epoch().count());
void precalc() {}
const li mod = 998244353;
vector<vector<li>> g;
vector<li> order;
vector<li> parent;
vector<li> cnt;
void dfs(li v, li p) {
  parent[v] = p;
  cnt[v] = 1;
  order.push_back(v);
  for (li to : g[v]) {
    if (to == p) {
      continue;
    }
    dfs(to, v);
    cnt[v] += cnt[to];
  }
}
struct Query {
  li type, v;
  li d;
};
struct SqrtParent {
  li far_parent;
  li pred_parent;
};
void add(li& cur, li val) { cur = (cur + val) % mod; }
void simple_add(li& cur, li val) {
  cur += val;
  if (cur >= mod) {
    cur -= mod;
  }
}
li my_rand() { return (rand() << 16) | rand(); }
void solve(__attribute__((unused)) bool read) {
  li n, Q;
  g.clear();
  order.clear();
  if (read) {
    cin >> n >> Q;
  } else {
    n = my_rand() % 1000 + 1;
    Q = my_rand() % 1000 + 1;
    n = 150000;
    Q = 150000;
  }
  g.resize(n);
  for (li i = 1; i < n; ++i) {
    li a, b;
    if (read) {
      cin >> a >> b;
      --a;
      --b;
    } else {
      a = i;
      b = my_rand() % i;
      b = i - 1;
    }
    g[a].push_back(b);
    g[b].push_back(a);
  }
  parent.assign(n, -1);
  cnt.assign(n, 0);
  dfs(0, -1);
  vector<Query> qs(Q);
  for (li i = 0; i < Q; ++i) {
    if (read) {
      cin >> qs[i].type >> qs[i].v;
      --qs[i].v;
    } else {
      qs[i].type = 1 + my_rand() % 2;
      qs[i].v = my_rand() % n;
    }
    if (qs[i].type == 1) {
      if (read) {
        cin >> qs[i].d;
      } else {
        qs[i].d = my_rand() % (li)1e7;
      }
    }
  }
  vector<li> pos_in_order(n);
  for (li i = 0; i < order.size(); ++i) {
    pos_in_order[order[i]] = i;
  }
  for (li i = 0; i < n; ++i) {
    auto it = find(g[i].begin(), g[i].end(), parent[i]);
    if (it != g[i].end()) {
      g[i].erase(it);
    }
  }
  li block_size = max(1LL, (li)sqrt(max(n, Q)) * 2);
  vector<li> vs;
  li TIMER = 0;
  vector<li> used(n);
  vector<SqrtParent> sqrt_parents(n, {-1, -1});
  vector<li> sum_inner_queries(n, 0);
  vector<li> pushed_queries(n, 0);
  li global_add = 0;
  vector<li> add_by_vertex(n, 0);
  li rev_n = binpow(n, mod - 2, mod);
  vector<li> mults(n, 0);
  for (li i = 0; i < n; ++i) {
    if (parent[i] != -1) {
      mults[i] = (n - cnt[parent[i]] - cnt[i]) * rev_n % mod;
      if (mults[i] < 0) {
        mults[i] += mod;
      }
    }
  }
  for (li w = 0; w < Q; w += block_size) {
    ++TIMER;
    li border = min(w + block_size, Q);
    vs.clear();
    vs.push_back(0);
    for (li i = w; i < border; ++i) {
      vs.push_back(qs[i].v);
    }
    sort(vs.begin(), vs.end(),
         [&](li q, li w) { return pos_in_order[q] < pos_in_order[w]; });
    vs.erase(unique(vs.begin(), vs.end()), vs.end());
    for (li v : vs) {
      used[v] = TIMER;
    }
    for (li v : order) {
      li far_parent = sqrt_parents[v].far_parent;
      li pred_parent = sqrt_parents[v].pred_parent;
      if (used[v] == TIMER) {
        far_parent = v;
        pred_parent = v;
      }
      for (li to : g[v]) {
        sqrt_parents[to] = {far_parent, (far_parent == v) ? to : pred_parent};
      }
    }
    for (li i = w; i < border; ++i) {
      li v = qs[i].v;
      if (qs[i].type == 1) {
        li d = qs[i].d;
        add(global_add, cnt[v] * d % mod * rev_n);
        add(add_by_vertex[v], (n - cnt[v]) * d % mod * rev_n);
        add(sum_inner_queries[v], d);
      } else {
        li cur_res = (global_add + add_by_vertex[v]) % mod;
        li pred = v;
        while (pred != 0) {
          li par = sqrt_parents[pred].far_parent;
          li pred_par = sqrt_parents[pred].pred_parent;
          add(cur_res, mults[pred_par] * sum_inner_queries[par]);
          pred = par;
        }
        if (read) {
          cur_res %= mod;
          if (cur_res < 0) {
            cur_res += mod;
          }
          cout << cur_res << "\n";
        }
      }
    }
    for (li v : vs) {
      for (li to : g[v]) {
        add(pushed_queries[to], mults[to] * sum_inner_queries[v]);
      }
      sum_inner_queries[v] = 0;
    }
    for (li v : order) {
      simple_add(add_by_vertex[v], pushed_queries[v]);
      for (li to : g[v]) {
        simple_add(pushed_queries[to], pushed_queries[v]);
      }
    }
    pushed_queries.assign(n, 0);
  }
}