#include <bits/stdc++.h>
using namespace std;
const int N = 514514;
struct edge {
  int v, nt;
  long long w;
} e[N << 1];
long long t1[N], t2[N], dp[N];
long long tr[N << 1], mn[N << 1], lz[N << 1];
int hd[N], d[N], fa[N], tp[N], s[N], sz[N], in[N], uu[N];
int n, m, tot, pos;
void add(int x, int y, int z) {
  e[++tot] = {y, hd[x], z};
  hd[x] = tot;
}
void down(int i) {
  long long k = lz[i];
  lz[i] = 0;
  lz[(i << 1)] += k, lz[(i << 1 | 1)] += k;
  mn[(i << 1)] += k, mn[(i << 1 | 1)] += k;
}
void upd(int i, int l, int r, int s, int t, long long w1, long long w2) {
  if (s <= l && r <= t) {
    if (w1) tr[i] = w1;
    mn[i] += w2;
    lz[i] += w2;
    return;
  }
  down(i);
  if (s <= ((l + r) >> 1)) upd((i << 1), l, ((l + r) >> 1), s, t, w1, w2);
  if (t > ((l + r) >> 1))
    upd((i << 1 | 1), ((l + r) >> 1) + 1, r, s, t, w1, w2);
  tr[i] = tr[(i << 1)] + tr[(i << 1 | 1)];
  mn[i] = min(mn[(i << 1)], mn[(i << 1 | 1)]);
}
long long ask1(int i, int l, int r, int s, int t) {
  if (s <= l && r <= t) return tr[i];
  long long ans = 0;
  if (s <= ((l + r) >> 1)) ans = ask1((i << 1), l, ((l + r) >> 1), s, t);
  if (t > ((l + r) >> 1))
    ans += ask1((i << 1 | 1), ((l + r) >> 1) + 1, r, s, t);
  return ans;
}
long long ask2(int i, int l, int r, int s, int t) {
  if (s <= l && r <= t) return mn[i];
  long long ans = 1e18;
  down(i);
  if (s <= ((l + r) >> 1)) ans = ask2((i << 1), l, ((l + r) >> 1), s, t);
  if (t > ((l + r) >> 1))
    ans = min(ans, ask2((i << 1 | 1), ((l + r) >> 1) + 1, r, s, t));
  return ans;
}
void dfs1(int x, int f) {
  fa[x] = f, d[x] = d[f] + 1;
  sz[x] = 1;
  for (int i = hd[x], to; i; i = e[i].nt) {
    to = e[i].v;
    dp[to] = dp[x] + e[i].w;
    dfs1(to, x);
    t2[to] = e[i].w;
    sz[x] += sz[to];
    if (sz[to] > sz[s[x]]) s[x] = to;
  }
}
void dfs2(int x, int f) {
  tp[x] = f;
  in[x] = ++pos;
  upd(1, 1, n, in[x], in[x], t2[x], 0);
  upd(1, 1, n, in[x], in[x], 0, dp[x] + t1[x]);
  if (!s[x]) return;
  dfs2(s[x], f);
  for (int i = hd[x], to; i; i = e[i].nt) {
    to = e[i].v;
    if (to == s[x]) continue;
    dfs2(to, to);
  }
}
long long qry(int x) {
  long long ans = 0;
  while (tp[x] != 1) {
    ans += ask1(1, 1, n, in[tp[x]], in[x]);
    x = fa[tp[x]];
  }
  ans += ask1(1, 1, n, 1, in[x]);
  return ans;
}
bool isfa(int x, int y) {
  if (in[y] >= in[x] && in[y] <= in[x] + sz[x] - 1) return 1;
  return 0;
}
long long solve(int x, int y) {
  long long mn = 1e18;
  long long dx = qry(x), dy = qry(y);
  if (isfa(x, y)) return abs(dx - dy);
  mn = ask2(1, 1, n, in[x], in[x] + sz[x] - 1) - dx + dy;
  return mn;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1, x, y, z; i <= n - 1; i++) {
    scanf("%d%d%d", &x, &y, &z);
    add(x, y, z);
  }
  for (int i = 1, x, y, z; i <= n - 1; i++) {
    scanf("%d%d%d", &x, &y, &z);
    t1[x] = z;
    uu[i + n - 1] = x;
  }
  dfs1(1, 0);
  dfs2(1, 1);
  for (int i = 1, ty, x, y; i <= m; i++) {
    scanf("%d%d%d", &ty, &x, &y);
    if (ty == 1) {
      int u = e[x].v;
      if (x > n - 1)
        u = uu[x], upd(1, 1, n, in[u], in[u], 0, y - t1[u]), t1[u] = y;
      else
        upd(1, 1, n, in[u], in[u] + sz[u] - 1, 0, y - t2[u]),
            upd(1, 1, n, in[u], in[u], y, 0), t2[u] = y;
    } else
      printf("%lld\n", solve(x, y));
  }
}
