#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:300000000")
const long double eps = 1e-20;
const long double pi = acos(-1.0);
const long long inf = 1000 * 1000 * 1000 * 1000 * 1000 * 1000;
const long long base = 1000 * 1000 * 1000 + 7;
using namespace std;
vector<vector<int> > g(111111), f(111111);
int depth[111111], where[111111];
int n, root, q, x, y, tq, dep, val;
void dfs(int v, int dep, int pr, int who) {
  where[v] = who;
  depth[v] = dep;
  f[who].push_back(0);
  for (int i = 0; i < (g[v].size()); i++)
    if (g[v][i] != pr) dfs(g[v][i], dep + 1, v, who);
}
int fs(int pos, int x) {
  int res = 0;
  for (int i = x; i > 0; i = (i & (i + 1)) - 1) res += f[pos][i];
  return res;
}
void md(int pos, int x, int val) {
  for (int i = x; i < f[pos].size(); i = i | (i + 1)) f[pos][i] += val;
}
int main() {
  scanf("%d%d", &n, &q);
  for (int i = 0; i < (n - 1); i++) {
    scanf("%d%d", &x, &y);
    x--;
    y--;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  for (int i = 0; i < (n + n); i++) f[0].push_back(0);
  for (int i = 0; i < (g[0].size()); i++) {
    f[i + 1].push_back(0);
    dfs(g[0][i], 1, 0, i + 1);
  }
  for (int i = 0; i < (q); i++) {
    scanf("%d", &tq);
    if (tq == 1) {
      scanf("%d", &x);
      x--;
      if (x == 0)
        printf("%d\n", root);
      else
        printf("%d\n", fs(where[x], depth[x]) + fs(0, depth[x]));
    } else {
      scanf("%d%d%d", &x, &val, &dep);
      x--;
      if (x == 0) {
        root += val;
        md(0, 1, val);
        md(0, dep + 1, -val);
        continue;
      }
      if (depth[x] > dep) {
        md(where[x], depth[x] - dep, val);
        md(where[x], depth[x] + dep + 1, -val);
      } else {
        root += val;
        md(0, 1, val);
        md(0, -depth[x] + dep + 1, -val);
        md(where[x], dep - depth[x] + 1, val);
        md(where[x], depth[x] + dep + 1, -val);
      }
    }
  }
  return 0;
}
