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*.
The first line contains integers *n* (2 ≤ *n* ≤ 10<sup class="upper-index">5</sup>) and *q* (1 ≤ *q* ≤ 10<sup class="upper-index">5</sup>) — the number of tree nodes and the number of requests, correspondingly.

Each of the next *n*  -  1 lines contains two integers *u*<sub class="lower-index">*i*</sub> and *v*<sub class="lower-index">*i*</sub> (1 ≤ *u*<sub class="lower-index">*i*</sub>, *v*<sub class="lower-index">*i*</sub> ≤ *n*, *u*<sub class="lower-index">*i*</sub> ≠ *v*<sub class="lower-index">*i*</sub>), that show that there is an edge between nodes *u*<sub class="lower-index">*i*</sub> and *v*<sub class="lower-index">*i*</sub>. 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* ≤ 10<sup class="upper-index">4</sup>, 1 ≤ *d* &lt; *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.
#include<bits/stdc++.h>
#define NOT_STONKS ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)

using namespace std;
const int maxn = 1e5 + 10; //4e6 + 10; //3e5 + 10;
const int mod = 1e9 + 7; //998244353;
typedef long long ll;

int n, q, Time, arr[maxn], st[maxn], fn[maxn], h[maxn];
vector<int> adj[maxn];

struct SegTree {
    ll node[maxn << 2];

    void build(int l = 0, int r = n + 1, int idx = 1) {
        if (r - l == 1) {
            node[idx] = arr[l];
            return;
        }
        int mid = (l + r) >> 1;
        build(l, mid, idx << 1);
        build(mid, r, idx << 1 | 1);
        node[idx] = node[idx << 1] + node[idx << 1 | 1];
    }

    void add(int v, int val, int l = 0, int r = n + 1, int idx = 1) {
        if (r - l == 1 && l == v) {
            node[idx] += val;
            return;
        }
        int mid = (l + r) >> 1;
        if (v < mid) add(v, val, l, mid, idx << 1);
        else add(v, val, mid, r, idx << 1 | 1);
        node[idx] = node[idx << 1] + node[idx << 1 | 1];
    }

    ll get(int x, int y, int l = 0, int r = n + 1, int idx = 1) {
        if (l >= x && r <= y) return node[idx];
        if (l >= y || r <= x) return 0;
        int mid = (l + r) >> 1;
        return get(x, y, l, mid, idx << 1) + get(x, y, mid, r, idx << 1 | 1);
    }
} segA, segH;

void dfs(int v, int par = -1) {
    st[v] = Time++;
    for (int u : adj[v]) if (u != par) {
        h[u] = h[v] + 1;
        dfs(u, v);
    }
    fn[v] = Time;
}

int main() {
    NOT_STONKS;

    cin >> n >> q;
    for (int i = 0; i < n - 1; i++) {
        int u, v;
        cin >> u >> v;
        adj[u].push_back(v);
        adj[v].push_back(u);
    }
    dfs(1);
    segA.build();
    segH.build();

    while (q--) {
        int op, v, x, d;
        cin >> op;
        if (op == 0) {
            cin >> v >> x >> d;
            if (d > h[v]) {
                segH.add(0, x); 
                segH.add(d - h[v] + 1, -x);
                segA.add(min(fn[v], st[v] + d - 2 * h[v] + 1), x);
                segA.add(min(st[v] + d + 1, fn[v]), -x);
            } else {
                segA.add(st[v] - d, x);
                segA.add(min(st[v] + d + 1, fn[v]), -x);
            }
        } else {
            cin >> v;
            cout << segA.get(0, st[v] + 1) + segH.get(0, h[v] + 1) << '\n';
        }
    }
    return 0;
}

