#include <bits/stdc++.h>
using namespace std;
long long n;
struct qwq {
  long long v;
  long long w;
  long long nxt;
} edge[500010];
long long cnt = -1;
long long head[500010];
void add(long long u, long long v, long long w) {
  edge[++cnt].nxt = head[u];
  edge[cnt].v = v;
  edge[cnt].w = w;
  head[u] = cnt;
}
long long dep[500010];
long long fa[500010];
long long son[500010];
long long siz[500010];
long long dis[500010];
void dfs1(long long u, long long f) {
  siz[u] = 1;
  for (long long i = head[u]; ~i; i = edge[i].nxt) {
    long long v = edge[i].v;
    if (v == f) continue;
    fa[v] = u;
    dep[v] = dep[u] + 1;
    dis[v] = dis[u] + edge[i].w;
    dfs1(v, u);
    siz[u] += siz[v];
    if (siz[v] > siz[son[u]]) son[u] = v;
  }
}
long long tim;
long long dfn[500010];
long long rea[500010];
long long top[500010];
void dfs2(long long u, long long tp) {
  dfn[u] = ++tim;
  rea[tim] = u;
  top[u] = tp;
  if (son[u]) {
    dfs2(son[u], tp);
  }
  for (long long i = head[u]; ~i; i = edge[i].nxt) {
    long long v = edge[i].v;
    if (v == fa[u] || v == son[u]) continue;
    dfs2(v, v);
  }
}
long long minn[800010];
long long sum[800010];
long long sb[500010];
void up(long long o) { minn[o] = min(minn[o << 1], minn[o << 1 | 1]); }
long long tag[800010];
void down(long long o, long long v, long long type) {
  if (type == 0) sum[o] += v;
  tag[o] += v, minn[o] += v;
}
void pushdown(long long o) {
  if (tag[o]) {
    down(o << 1, tag[o], 0);
    down(o << 1 | 1, tag[o], 0);
    tag[o] = 0;
  }
}
void build(long long o, long long l, long long r) {
  if (l == r) {
    minn[o] = dis[rea[l]] + sb[rea[l]];
    sum[o] = dis[rea[l]];
    return;
  }
  long long mid = (l + r) / 2;
  build(o << 1, l, mid);
  build(o << 1 | 1, mid + 1, r);
  up(o);
}
void update(long long o, long long l, long long r, long long L, long long R,
            long long v, bool type) {
  if (L <= l && r <= R) {
    down(o, v, type);
    return;
  }
  pushdown(o);
  long long mid = (l + r) / 2;
  if (L <= mid) update(o << 1, l, mid, L, R, v, type);
  if (mid < R) update(o << 1 | 1, mid + 1, r, L, R, v, type);
  up(o);
}
long long queryminn(long long o, long long l, long long r, long long L,
                    long long R) {
  if (L <= l && r <= R) {
    return minn[o];
  }
  pushdown(o);
  long long mid = (l + r) / 2;
  long long ret = 19198e10;
  if (L <= mid) ret = min(ret, queryminn(o << 1, l, mid, L, R));
  if (mid < R) ret = min(ret, queryminn(o << 1 | 1, mid + 1, r, L, R));
  return ret;
}
long long queryx(long long o, long long l, long long r, long long x) {
  if (l == r) {
    return sum[o];
  }
  pushdown(o);
  long long mid = (l + r) / 2;
  if (x <= mid)
    return queryx(o << 1, l, mid, x);
  else
    return queryx(o << 1 | 1, mid + 1, r, x);
}
long long LCA(long long u, long long v) {
  while (top[u] != top[v]) {
    if (dep[u] < dep[v]) swap(u, v);
    u = fa[top[u]];
  }
  if (dep[u] > dep[v]) swap(u, v);
  return u;
}
long long query(long long u, long long v) {
  if (LCA(u, v) == u) {
    return queryx(1, 1, n, dfn[v]) - queryx(1, 1, n, dfn[u]);
  } else {
    return queryx(1, 1, n, dfn[v]) - queryx(1, 1, n, dfn[u]) +
           queryminn(1, 1, n, dfn[u], dfn[u] + siz[u] - 1);
  }
}
struct e {
  long long v;
  long long fa, u;
} ed[500010];
void change(long long i, long long v) {
  if (i <= n - 1) {
    update(1, 1, n, dfn[ed[i].u], dfn[ed[i].u] + siz[ed[i].u] - 1, v - ed[i].v,
           0);
    ed[i].v = v;
  } else {
    update(1, 1, n, dfn[ed[i].u], dfn[ed[i].u], v - sb[ed[i].u], 1);
    sb[ed[i].u] = v;
  }
}
signed main() {
  memset(head, -1, sizeof(head));
  long long q;
  scanf("%lld%lld", &n, &q);
  for (long long i = 1; i < n; ++i) {
    long long u, v, w;
    scanf("%lld%lld%lld", &u, &v, &w);
    add(u, v, w), add(v, u, w);
    ed[i].fa = u, ed[i].u = v, ed[i].v = w;
  }
  for (long long i = 1; i < n; ++i) {
    long long u, v;
    scanf("%lld%lld", &u, &v);
    scanf("%lld", &sb[u]);
    ed[i + n - 1].u = u;
  }
  dfs1(1, -1), dfs2(1, 1);
  build(1, 1, n);
  for (long long i = 1; i <= q; ++i) {
    long long opt, x, y;
    scanf("%lld%lld%lld", &opt, &x, &y);
    if (opt == 1) {
      change(x, y);
    } else {
      printf("%lld\n", query(x, y));
    }
  }
}
