#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using ii = pair<int, int>;
template <typename A, typename B>
ostream& operator<<(ostream& os, pair<A, B> p) {
  return os << '{' << p.first << ", " << p.second << '}';
}
template <typename A, typename B>
istream& operator>>(istream& is, pair<A, B>& p) {
  return is >> p.first >> p.second;
}
const int oo = 0x3f3f3f3f;
const ll OO = ll(oo) * oo;
const int N = 100005;
struct Segtree {
  vi t;
  int n;
  void alloc() {
    n++;
    t.resize(n << 1);
  }
  void update(int l, int r, int x) {
    r = min(r, n);
    l = max(l, 0);
    for (l += n, r += n; l < r; l >>= 1, r >>= 1) {
      if (l & 1) t[l++] += x;
      if (r & 1) t[--r] += x;
    }
  }
  int query(int i) {
    int ans = 0;
    for (i += n; i > 0; i >>= 1) {
      ans += t[i];
    }
    return ans;
  }
};
vector<vi> g;
int depth[N];
int path[N];
int pos[N];
Segtree st[N];
void dfs(int u, int p) {
  st[path[u]].n++;
  for (int v : g[u])
    if (v != p) {
      path[v] = path[u];
      depth[v] = depth[u] + 1;
      dfs(v, u);
    }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int q;
  cin >> q;
  Segtree start;
  start.n = N - 1;
  start.alloc();
  g.resize(n + 1);
  int root = 1;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    g[u].emplace_back(v);
    g[v].emplace_back(u);
    if (g[u].size() > 2) root = u;
    if (g[v].size() > 2) root = v;
  }
  int p = 0;
  for (int v : g[root]) {
    path[v] = p;
    depth[v] = 1;
    dfs(v, root);
    st[p++].alloc();
  }
  int rootx = 0;
  while (q--) {
    int t;
    cin >> t;
    if (t == 0) {
      int u, x, d;
      cin >> u >> x >> d;
      if (u == root) {
        rootx += x;
        start.update(1, d + 1, x);
      } else {
        st[path[u]].update(depth[u] - d, depth[u] + d + 1, x);
        st[path[u]].update(1, d - depth[u] + 1, -x);
        start.update(1, d - depth[u] + 1, x);
        if (depth[u] - d <= 0) rootx += x;
      }
    } else {
      int u;
      cin >> u;
      if (u == root) {
        cout << rootx << '\n';
      } else {
        cout << st[path[u]].query(depth[u]) + start.query(depth[u]) << '\n';
      }
    }
  }
  return 0;
}
