A little girl loves problems on trees very much. Here's one of them.

A tree is an undirected connected graph, not containing cycles. The degree of node x in the tree is the number of nodes y of the tree, such that each of them is connected with node x by some edge of the tree. 

Let's consider a tree that consists of n nodes. We'll consider the tree's nodes indexed from 1 to n. The cosidered tree has the following property: each node except for node number 1 has the degree of at most 2.

Initially, each node of the tree contains number 0. Your task is to quickly process the requests of two types:

  * Request of form: 0 v x d. In reply to the request you should add x to all numbers that are written in the nodes that are located at the distance of at most d from node v. The distance between two nodes is the number of edges on the shortest path between them. 
  * Request of form: 1 v. In reply to the request you should print the current number that is written in node v. 

Input

The first line contains integers n (2 ≤ n ≤ 105) and q (1 ≤ q ≤ 105) — the number of tree nodes and the number of requests, correspondingly.

Each of the next n - 1 lines contains two integers ui and vi (1 ≤ ui, vi ≤ n, ui ≠ vi), that show that there is an edge between nodes ui and vi. Each edge's description occurs in the input exactly once. It is guaranteed that the given graph is a tree that has the property that is described in the statement.

Next q lines describe the requests.

  * The request to add has the following format: 0 v x d (1 ≤ v ≤ n, 1 ≤ x ≤ 104, 1 ≤ d < n). 
  * The request to print the node value has the following format: 1 v (1 ≤ v ≤ n). 



The numbers in the lines are separated by single spaces.

Output

For each request to print the node value print an integer — the reply to the request.

Examples

Input

3 6
1 2
1 3
0 3 1 2
0 2 3 1
0 1 5 2
1 1
1 2
1 3


Output

9
9
6


Input

6 11
1 2
2 5
5 4
1 6
1 3
0 3 1 3
0 3 4 5
0 2 1 4
0 1 5 5
0 4 6 2
1 1
1 2
1 3
1 4
1 5
1 6


Output

11
17
11
16
17
11
#include <bits/stdc++.h>
using namespace std;
const int dy[] = {-1, 0, 1, 0}, dx[] = {0, 1, 0, -1};
const double EPS = 1e-8;
const double PI = acos(-1.0);
int popcount(int n) { return __builtin_popcount(n); }
int popcount(unsigned long long n) { return __builtin_popcountll(n); }
template <class T>
int SIZE(T a) {
  return a.size();
}
template <class T>
string IntToString(T num) {
  string res;
  stringstream ss;
  ss << num;
  return ss.str();
}
template <class T>
T StringToInt(string str) {
  T res = 0;
  for (int i = 0; i < SIZE(str); i++) res = (res * 10 + str[i] - '0');
  return res;
}
template <class T>
T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <class T>
void PrintSeq(T &a, int sz) {
  for (int i = 0; i < sz; i++) {
    cout << a[i];
    if (sz == i + 1)
      cout << endl;
    else
      cout << ' ';
  }
}
bool EQ(double a, double b) { return abs(a - b) < EPS; }
bool EQV(complex<double> a, complex<double> b) {
  return EQ(a.real(), b.real()) & EQ(a.imag(), b.imag());
}
void fastStream() {
  cin.tie(0);
  std::ios_base::sync_with_stdio(0);
}
vector<string> split(string str, char del) {
  vector<string> res;
  for (int i = 0, s = 0; i < SIZE(str); i++) {
    if (str[i] == del) {
      if (i - s != 0) res.push_back(str.substr(s, i - s));
      s = i + 1;
    } else if (i == SIZE(str) - 1) {
      res.push_back(str.substr(s));
    }
  }
  return res;
}
template <class T>
class RangeAddTree {
 public:
  int n;
  vector<T> dat;
  void init(int n_) {
    n = 1;
    while (n < n_) n *= 2;
    dat.clear();
    for (int i = 0; i < 2 * n - 1; i++) dat.push_back(0);
  }
  void _addRange(int a, int b, int k, int l, int r, T x) {
    if (r <= a || b <= l)
      return;
    else if (a <= l && r <= b)
      dat[k] += x;
    else {
      _addRange(a, b, k * 2 + 1, l, (l + r) / 2, x);
      _addRange(a, b, k * 2 + 2, (l + r) / 2, r, x);
    }
  }
  void addRange(int a, int b, T x) { _addRange(a, b, 0, 0, n, x); }
  T query(int k) {
    T res = 0;
    k += n - 1;
    res = dat[k];
    while (k > 0) {
      k = (k - 1) / 2;
      res += dat[k];
    }
    return res;
  }
};
int N, Q;
vector<int> G[100001];
int depths[100001];
int angs[100001];
int rootNum;
RangeAddTree<int> globalTree;
vector<RangeAddTree<int> > treesByAngs;
int angSize[100001];
void dfs(int now, int prv, int depth, int ang) {
  depths[now] = depth;
  angs[now] = ang;
  angSize[ang]++;
  bool noRec = true;
  for (int i = 0; i < (int)G[now].size(); i++) {
    int to = G[now][i];
    if (to == prv) continue;
    noRec = false;
    dfs(to, now, depth + 1, ang);
  }
  if (noRec) {
    treesByAngs.push_back(RangeAddTree<int>());
    treesByAngs[(int)treesByAngs.size() - 1].init(depth + 2);
  }
}
int main() {
  cin >> N >> Q;
  globalTree.init(N);
  for (int i = 0; i < N - 1; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    G[u].push_back(v);
    G[v].push_back(u);
  }
  for (int i = 0; i < (int)G[0].size(); i++) {
    int to = G[0][i];
    dfs(to, 0, 0, i);
  }
  for (int q = 0; q < Q; q++) {
    int a, v, x, d;
    cin >> a >> v;
    v--;
    if (a == 0) {
      cin >> x >> d;
      if (v == 0) {
        rootNum += x;
        int newDist = d;
        globalTree.addRange(0, newDist, x);
      } else {
        int ang = angs[v];
        int ds = angSize[ang];
        int pos = depths[v];
        int minr = max(0, pos - d);
        int maxr = min(ds - 1, pos + d);
        treesByAngs[ang].addRange(minr, maxr + 1, x);
        if (pos - d < 0) {
          rootNum += x;
          int newDist = abs(pos - d) - 1;
          if (newDist > 0) {
            globalTree.addRange(0, newDist, x);
            treesByAngs[ang].addRange(0, min(ds, newDist), -x);
          }
        }
      }
    } else {
      if (v == 0)
        cout << rootNum << endl;
      else {
        int ang = angs[v];
        int depth = depths[v];
        int sum = globalTree.query(depth);
        sum += treesByAngs[ang].query(depth);
        cout << sum << endl;
      }
    }
  }
  return 0;
}
