#include <bits/stdc++.h>
using namespace std;
namespace IO {
const int MAXIOSIZE = 1 << 24 | 1;
unsigned char buf[MAXIOSIZE], *p1, *p2;
template <typename T>
void read(T& x) {
  x = 0;
  char ch =
      (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 24, stdin), p1 == p2)
           ? EOF
           : *p1++);
  bool flg = false;
  for (; ch < '0' || '9' < ch;
       ch = (p1 == p2 &&
                     (p2 = (p1 = buf) + fread(buf, 1, 1 << 24, stdin), p1 == p2)
                 ? EOF
                 : *p1++))
    if (ch == '-') flg |= true;
  for (; '0' <= ch && ch <= '9';
       ch = (p1 == p2 &&
                     (p2 = (p1 = buf) + fread(buf, 1, 1 << 24, stdin), p1 == p2)
                 ? EOF
                 : *p1++))
    x = x * 10 + ch - '0';
  flg ? x = -x : 0;
}
template <typename T>
void out(const T& x) {
  if (x > 9) out(x / 10);
  putchar(x % 10 + '0');
}
template <typename T>
inline void write(const T& x, const char& ed = ' ') {
  if (x < 0)
    putchar('-'), out(-x);
  else
    out(x);
  putchar(ed);
}
}  // namespace IO
const int MAXN = 2e5 + 10;
int n, q;
int head[MAXN], ecnt;
struct Edge {
  int nxt, to, w;
} e[MAXN];
void add(int u, int v, int w) {
  e[++ecnt].nxt = head[u], e[ecnt].to = v, e[ecnt].w = w, head[u] = ecnt;
}
int dfsclock, dtp[MAXN];
struct Vertix {
  int sz, fa, dfn, w;
} vtx[MAXN];
int edgenum[MAXN], edgenum2[MAXN << 1];
;
long long w2[MAXN];
void dfs(int u, int fr) {
  vtx[u].sz = 1, vtx[u].fa = fr;
  dtp[vtx[u].dfn = ++dfsclock] = u;
  for (int _ = head[u], v = e[_].to; _; _ = e[_].nxt, v = e[_].to) {
    vtx[v].w = e[_].w, edgenum[_] = v;
    dfs(v, u);
    vtx[u].sz += vtx[v].sz;
  }
}
struct Segment_tree {
  struct Node {
    long long val, add, mnval;
  } t[MAXN << 2];
  void pushdown(int k) {
    long long& d = t[k].add;
    t[k << 1].add += d, t[k << 1 | 1].add += d;
    t[k << 1].val += d, t[k << 1 | 1].val += d;
    t[k << 1].mnval += d, t[k << 1 | 1].mnval += d;
    d = 0;
  }
  void pushup(int k) {
    if (t[k << 1].mnval < t[k << 1 | 1].mnval)
      t[k].mnval = t[k << 1].mnval;
    else
      t[k].mnval = t[k << 1 | 1].mnval;
  }
  void modify(int k, int l, int r, int ql, int qr, long long val) {
    if (ql <= l && r <= qr)
      return t[k].add += val, t[k].val += val, t[k].mnval += val, void();
    pushdown(k);
    if (ql <= ((l + r) >> 1)) modify(k << 1, l, ((l + r) >> 1), ql, qr, val);
    if (qr > ((l + r) >> 1))
      modify(k << 1 | 1, ((l + r) >> 1) + 1, r, ql, qr, val);
    pushup(k);
  }
  long long query(int k, int l, int r, int pos) {
    if (l == r) return t[k].val;
    pushdown(k);
    if (pos <= ((l + r) >> 1))
      return query(k << 1, l, ((l + r) >> 1), pos);
    else
      return query(k << 1 | 1, ((l + r) >> 1) + 1, r, pos);
  }
  long long mnval(int k, int l, int r, int ql, int qr) {
    if (ql <= l && r <= qr) return t[k].mnval;
    pushdown(k);
    long long res = LONG_LONG_MAX;
    if (ql <= ((l + r) >> 1))
      res = min(res, mnval(k << 1, l, ((l + r) >> 1), ql, qr));
    if (qr > ((l + r) >> 1))
      res = min(res, mnval(k << 1 | 1, ((l + r) >> 1) + 1, r, ql, qr));
    return res;
  }
  void modify2(int k, int l, int r, int pos, long long val) {
    if (l == r) return t[k].mnval += val, void();
    pushdown(k);
    if (pos <= ((l + r) >> 1))
      modify2(k << 1, l, ((l + r) >> 1), pos, val);
    else
      modify2(k << 1 | 1, ((l + r) >> 1) + 1, r, pos, val);
    pushup(k);
  }
} sgt;
int main() {
  IO::read(n), IO::read(q);
  for (int i = (1), iend = (n - 1); i <= iend; ++i) {
    int u, v, w;
    IO::read(u), IO::read(v), IO::read(w);
    add(u, v, w);
  }
  dfs(1, 0);
  for (int i = (1), iend = (n - 1); i <= iend; ++i) {
    int idx, tt, w;
    IO::read(idx), IO::read(tt), IO::read(w);
    w2[idx] = w, edgenum2[n - 1 + i] = idx;
    sgt.modify2(1, 1, n, vtx[idx].dfn, w);
  }
  for (int i = (1), iend = (n); i <= iend; ++i) {
    sgt.modify(1, 1, n, vtx[i].dfn, vtx[i].dfn + vtx[i].sz - 1, vtx[i].w);
  }
  for (int i = (1), iend = (q); i <= iend; ++i) {
    int opt;
    IO::read(opt);
    if (opt == 1) {
      int idx, w;
      IO::read(idx), IO::read(w);
      if (idx <= n - 1) {
        int u = edgenum[idx];
        sgt.modify(1, 1, n, vtx[u].dfn, vtx[u].dfn + vtx[u].sz - 1, -vtx[u].w);
        vtx[u].w = w;
        sgt.modify(1, 1, n, vtx[u].dfn, vtx[u].dfn + vtx[u].sz - 1, vtx[u].w);
      } else {
        int u = edgenum2[idx];
        sgt.modify2(1, 1, n, vtx[u].dfn, -w2[u]);
        w2[u] = w;
        sgt.modify2(1, 1, n, vtx[u].dfn, w2[u]);
      }
    } else {
      int u, v;
      IO::read(u), IO::read(v);
      if (vtx[u].dfn <= vtx[v].dfn &&
          vtx[v].dfn <= vtx[u].dfn + vtx[u].sz - 1) {
        IO::write(
            sgt.query(1, 1, n, vtx[v].dfn) - sgt.query(1, 1, n, vtx[u].dfn),
            '\n');
      } else {
        long long sum1 =
            sgt.mnval(1, 1, n, vtx[u].dfn, vtx[u].dfn + vtx[u].sz - 1);
        IO::write(sum1 - sgt.query(1, 1, n, vtx[u].dfn) +
                      sgt.query(1, 1, n, vtx[v].dfn),
                  '\n');
      }
    }
  }
  return 0;
}
