#include <bits/stdc++.h>
using namespace std;
int inf;
const double eps = 1e-8;
const double pi = acos(-1.0);
template <class T>
int chkmin(T &a, T b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
int chkmax(T &a, T b) {
  return a < b ? a = b, 1 : 0;
}
template <class T>
T sqr(T a) {
  return a * a;
}
template <class T>
T mmin(T a, T b) {
  return a < b ? a : b;
}
template <class T>
T mmax(T a, T b) {
  return a > b ? a : b;
}
template <class T>
T aabs(T a) {
  return a < 0 ? -a : a;
}
template <class T>
int dcmp(T a, T b) {
  return a > b;
}
template <int *a>
int cmp_a(int first, int second) {
  return a[first] < a[second];
}
struct __INIT__ {
  __INIT__() { memset(&inf, 0x3f, sizeof(inf)); }
} __INIT___;
namespace io {
const int SIZE = (1 << 21) + 1;
char ibuf[SIZE], *iS, *iT, obuf[SIZE], *oS = obuf, *oT = oS + SIZE - 1, c,
                                       qu[55];
int f, qr;
inline void flush() {
  fwrite(obuf, 1, oS - obuf, stdout);
  oS = obuf;
}
inline void putc(char first) {
  *oS++ = first;
  if (oS == oT) flush();
}
template <typename A>
inline bool read(A &first) {
  for (f = 1, c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                              (iS == iT ? EOF : *iS++))
                            : *iS++);
       c < '0' || c > '9';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    if (c == '-')
      f = -1;
    else if (c == EOF)
      return 0;
  for (first = 0; c <= '9' && c >= '0';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    first = first * 10 + (c & 15);
  first *= f;
  return 1;
}
inline bool read(char &first) {
  while ((first = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                               (iS == iT ? EOF : *iS++))
                            : *iS++)) == ' ' ||
         first == '\n' || first == '\r')
    ;
  return first != EOF;
}
inline bool read(char *first) {
  while ((*first = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                                (iS == iT ? EOF : *iS++))
                             : *iS++)) == '\n' ||
         *first == ' ' || *first == '\r')
    ;
  if (*first == EOF) return 0;
  while (!(*first == '\n' || *first == ' ' || *first == '\r'))
    *(++first) = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                              (iS == iT ? EOF : *iS++))
                           : *iS++);
  *first = 0;
  return 1;
}
template <typename A, typename... B>
inline bool read(A &first, B &...second) {
  return read(first) && read(second...);
}
template <typename A>
inline bool write(A first) {
  if (!first) putc('0');
  if (first < 0) putc('-'), first = -first;
  while (first) qu[++qr] = first % 10 + '0', first /= 10;
  while (qr) putc(qu[qr--]);
  return 0;
}
inline bool write(char first) {
  putc(first);
  return 0;
}
inline bool write(const char *first) {
  while (*first) {
    putc(*first);
    ++first;
  }
  return 0;
}
inline bool write(char *first) {
  while (*first) {
    putc(*first);
    ++first;
  }
  return 0;
}
template <typename A, typename... B>
inline bool write(A first, B... second) {
  return write(first) || write(second...);
}
struct Flusher_ {
  ~Flusher_() { flush(); }
} io_flusher_;
}  // namespace io
using io ::putc;
using io ::read;
using io ::write;
vector<int> to[100005];
int vis[100005], siz[100005], sc, rt, rts, mxs[100005];
int dep[100005];
int fa[100005];
void dfs(int first, int f) {
  siz[first] = 1;
  mxs[first] = 0;
  for (auto i : to[first])
    if (i != f && !vis[i]) {
      dfs(i, first);
      siz[first] += siz[i];
      chkmax(mxs[first], siz[i]);
    }
}
void dfs1(int first, int f) {
  if (chkmin(rts, mmax(mxs[first], sc - siz[first]))) rt = first;
  for (auto i : to[first])
    if (i != f && !vis[i]) {
      dfs1(i, first);
    }
}
struct smt {
  int ls, rs;
  smt *l, *r;
  int tag;
  smt(int la, int ra) {
    ls = la;
    rs = ra;
    tag = 0;
    if (ls == rs) {
      l = r = 0;
      return;
    }
    int mid = (ls + rs) >> 1;
    l = new smt(ls, mid);
    r = new smt(mid + 1, rs);
  }
  void add(int la, int ra, int first) {
    if (la <= ls && rs <= ra) {
      tag += first;
      return;
    }
    if (la <= l->rs) l->add(la, ra, first);
    if (r->ls <= ra) r->add(la, ra, first);
  }
  int query(int first) {
    if (ls == rs) return tag;
    return tag + (first <= l->rs ? l->query(first) : r->query(first));
  }
};
smt *a[100005], *b[100005];
smt *stk[100005];
int bl, al;
int dis[100005][25], top;
void dfs2(int first, int f, int d, int id) {
  dis[first][id] = d;
  chkmax(bl, d);
  chkmax(al, d);
  for (auto i : to[first])
    if (i != f && !vis[i]) dfs2(i, first, d + 1, id);
}
int build(int first, int d) {
  dfs(first, 0);
  sc = siz[first];
  rt = 0;
  rts = sc;
  dfs1(first, 0);
  first = rt;
  vis[first] = 1;
  al = 0;
  int ot = top;
  dis[first][d] = 0;
  dep[first] = d;
  for (auto i : to[first])
    if (!vis[i]) {
      bl = 0;
      dfs2(i, first, 1, d);
      stk[++top] = new smt(0, bl);
    }
  a[first] = new smt(0, al);
  for (auto i : to[first])
    if (!vis[i]) {
      int son = build(i, d + 1);
      fa[son] = first;
      b[son] = stk[++ot];
    }
  return first;
}
int query(int first) {
  int ans = 0;
  for (int second = first; second; second = fa[second]) {
    ans += a[second]->query(dis[first][dep[second]]);
    if (fa[second]) ans -= b[second]->query(dis[first][dep[second] - 1]);
  }
  return ans;
}
void add(int first, int d, int w) {
  for (int second = first; second; second = fa[second]) {
    if (dis[first][dep[second]] <= d) {
      a[second]->add(0, d - dis[first][dep[second]], w);
    }
    if (fa[second] && dis[first][dep[second] - 1] <= d) {
      b[second]->add(0, d - dis[first][dep[second] - 1], w);
    }
  }
}
signed main() {
  int n, q, u, v, tp, first, d;
  read(n, q);
  for (int i = 1; i < n; ++i) {
    read(u, v);
    to[u].push_back(v);
    to[v].push_back(u);
  }
  build(1, 0);
  for (; q; --q) {
    read(tp, u);
    if (tp == 1) {
      write(query(u), '\n');
    } else {
      read(first, d);
      add(u, d, first);
    }
  }
  return 0;
}
