#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, q, u, v;
vector<int> adj[N];
int chain_id[N], flatten_idx[N];
int s[N], e[N];
int depth[N];
void dfs(int p, int gp, int d) {
  depth[p] = d;
  for (int ch : adj[p])
    if (ch != gp) dfs(ch, p, d + 1);
}
long long seg[2][1 << 20], lazy[2][1 << 20];
void push_down(int i, int ni, int ns, int ne) {
  if (!lazy[i][ni]) return;
  seg[i][ni] += lazy[i][ni];
  if (ns != ne) {
    int l = ni * 2 + 1, r = l + 1;
    lazy[i][l] += lazy[i][ni];
    lazy[i][r] += lazy[i][ni];
  }
  lazy[i][ni] = 0;
}
void update(int i, int qs, int qe, int v, int ni = 0, int ns = 0, int ne = n) {
  if (qs > qe) return;
  push_down(i, ni, ns, ne);
  if (ne < qs || ns > qe || ns > ne) return;
  if (ns >= qs && ne <= qe) {
    lazy[i][ni] += v;
    push_down(i, ni, ns, ne);
    return;
  }
  int l = ni * 2 + 1, r = l + 1, mid = (ns + ne) / 2;
  update(i, qs, qe, v, l, ns, mid);
  update(i, qs, qe, v, r, mid + 1, ne);
  seg[i][ni] = seg[i][l] + seg[i][r];
}
long long query(int i, int qs, int qe, int ni = 0, int ns = 0, int ne = n) {
  push_down(i, ni, ns, ne);
  if (ne < qs || ns > qe || ns > ne) return 0;
  if (ns >= qs && ne <= qe) return seg[i][ni];
  int l = ni * 2 + 1, r = l + 1, mid = (ns + ne) / 2;
  return query(i, qs, qe, l, ns, mid) + query(i, qs, qe, r, mid + 1, ne);
}
int main() {
  scanf("%d%d", &n, &q);
  for (int i = 1; i < n; ++i) {
    scanf("%d%d", &u, &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  int idx = 1;
  for (int i = 0; i < adj[1].size(); ++i) {
    int cur = adj[1][i], prnt = 1;
    s[i] = idx;
    while (1) {
      chain_id[cur] = i;
      flatten_idx[cur] = idx++;
      if (adj[cur].size() == 1) break;
      int tmp = cur;
      if (adj[cur][0] != prnt)
        cur = adj[cur][0];
      else
        cur = adj[cur][1];
      prnt = tmp;
    }
    e[i] = idx - 1;
  }
  dfs(1, 1, 0);
  while (q--) {
    int t, v;
    scanf("%d%d", &t, &v);
    if (!t) {
      int x, d;
      scanf("%d%d", &x, &d);
      if (v == 1)
        update(1, 0, d, x);
      else if (depth[v] > d)
        update(0, flatten_idx[v] - d, min(e[chain_id[v]], flatten_idx[v] + d),
               x);
      else {
        int rem = d - depth[v];
        update(1, 0, rem, x);
        update(0, s[chain_id[v]] + rem, min(e[chain_id[v]], flatten_idx[v] + d),
               x);
      }
    } else
      printf("%lld\n", query(0, flatten_idx[v], flatten_idx[v]) +
                           query(1, depth[v], depth[v]));
  }
  return 0;
}
