#include <bits/stdc++.h>
const int mod = 1e6;
using namespace std;
int n, q, maxn, ans0, L[100005];
bool vis[100005];
long long match[100005];
vector<int> G[100005];
vector<int> tree[100005];
int lowbit(int x) { return x & (-x); }
void update(int i, int pos, int x) {
  for (; i <= L[pos]; i += lowbit(i)) tree[pos][i] += x;
}
int query(int x, int pos) {
  int ans = 0;
  for (; x >= 1; x -= lowbit(x)) ans += tree[pos][x];
  return ans;
}
void dfs(int u, int num, int d) {
  vis[u] = 1;
  tree[num].push_back(0);
  match[u] = 1ll * num * mod + d;
  if (G[u].size() == 1) return;
  for (int i = 0; i <= 1; i++)
    if (!vis[G[u][i]]) dfs(G[u][i], num, d + 1);
}
int main() {
  scanf("%d%d", &n, &q);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    G[u].push_back(v);
    G[v].push_back(u);
  }
  vis[1] = 1;
  for (int i = 0; i < G[1].size(); i++) {
    tree[i + 1].push_back(0);
    dfs(G[1][i], i + 1, 1);
  }
  maxn = 0;
  for (int i = 0; i < G[1].size(); i++) {
    L[i + 1] = tree[i + 1].size() - 1;
    maxn = max(maxn, L[i + 1]);
  }
  L[0] = maxn;
  for (int i = 0; i <= L[0]; i++) tree[0].push_back(0);
  while (q--) {
    int k;
    scanf("%d", &k);
    if (k == 1) {
      int u;
      scanf("%d", &u);
      int pos = match[u] / mod;
      int l = match[u] % mod;
      if (l == 0)
        printf("%d\n", ans0);
      else
        printf("%d\n", query(l, 0) + query(l, pos));
    } else {
      int u, x, len;
      scanf("%d%d%d", &u, &x, &len);
      if (u == 1) {
        ans0 += x;
        update(1, 0, x);
        update(min(len, maxn) + 1, 0, -x);
        continue;
      }
      int pos = match[u] / mod;
      int l = match[u] % mod;
      int r1 = min(l + len, L[pos]);
      int l1 = max(l - len, 1);
      update(l1, pos, x);
      update(r1 + 1, pos, -x);
      if (l - len <= 0) ans0 += x;
      if (l - len < 0) {
        update(1, 0, x);
        update(len - l + 1, 0, -x);
        update(1, pos, -x);
        update(len - l + 1, pos, x);
      }
    }
  }
}
