#include <bits/stdc++.h>
using namespace std;
template <typename Tp>
inline void read(Tp &x) {
  x = 0;
  bool neg = false;
  char c = getchar();
  for (; !isdigit(c); c = getchar()) {
    if (c == '-') {
      neg = true;
    }
  }
  for (; isdigit(c); c = getchar()) {
    x = x * 10 + c - '0';
  }
  if (neg) {
    x = -x;
  }
}
const int N = 200000 + 5;
const long long INF = 0x3f3f3f3f3f3f3f3f;
int n, Q;
int head[N], E = 0;
struct Edge {
  int to, next, w;
} e[N];
inline void addEdge(int u, int v, int w) {
  e[++E] = (Edge){v, head[u], w};
  head[u] = E;
}
int from[N], back[N], node[N];
int in[N], out[N], tim = 0;
int ord[N];
long long dis[N];
void dfs(int u) {
  in[u] = ++tim;
  ord[tim] = u;
  for (int i = head[u], v; v = e[i].to, i; i = e[i].next) {
    dis[v] = dis[u] + e[i].w;
    dfs(v);
  }
  out[u] = tim;
}
namespace Seg {
const int N = ::N * 4 * 2;
long long a[N], tag[N];
inline void pushDown(int u) {
  if (tag[u] == 0) {
    return;
  }
  a[((u) << 1)] += tag[u];
  tag[((u) << 1)] += tag[u];
  a[((u) << 1 | 1)] += tag[u];
  tag[((u) << 1 | 1)] += tag[u];
  tag[u] = 0;
}
void build(int u, int l, int r) {
  if (l == r) {
    a[u] = dis[ord[l]] + back[ord[l]];
    return;
  }
  int mid = (l + r) >> 1;
  build(((u) << 1), l, mid);
  build(((u) << 1 | 1), mid + 1, r);
  a[u] = std::min(a[((u) << 1)], a[((u) << 1 | 1)]);
}
void update(int u, int l, int r, int ul, int ur, int x) {
  if (ul <= l && r <= ur) {
    a[u] += x;
    tag[u] += x;
    return;
  }
  pushDown(u);
  int mid = (l + r) >> 1;
  if (ul <= mid) {
    update(((u) << 1), l, mid, ul, ur, x);
  }
  if (mid < ur) {
    update(((u) << 1 | 1), mid + 1, r, ul, ur, x);
  }
  a[u] = std::min(a[((u) << 1)], a[((u) << 1 | 1)]);
}
long long query(int u, int l, int r, int ql, int qr) {
  if (ql <= l && r <= qr) {
    return a[u];
  }
  pushDown(u);
  int mid = (l + r) >> 1;
  long long res = INF;
  if (ql <= mid) {
    res = query(((u) << 1), l, mid, ql, qr);
  }
  if (mid < qr) {
    res = std::min(res, query(((u) << 1 | 1), mid + 1, r, ql, qr));
  }
  return res;
}
inline long long get(int u) { return query(1, 1, n, in[u], in[u]); }
}  // namespace Seg
int main() {
  read(n), read(Q);
  for (int i = 1, u, v, w; i < n; ++i) {
    read(u), read(v), read(w);
    from[v] = w;
    addEdge(u, v, w);
  }
  dfs(1);
  for (int i = 1, u, v, w; i < n; ++i) {
    read(u), read(v), read(w);
    back[u] = w;
    node[i] = u;
  }
  Seg::build(1, 1, n);
  for (int i = 0, op, e, w, u, v; i < Q; ++i) {
    read(op);
    if (op == 1) {
      read(e), read(w);
      if (e >= n) {
        u = node[e - (n - 1)];
        Seg::update(1, 1, n, in[u], in[u], w - back[u]);
        back[u] = w;
      } else {
        u = ::e[e].to;
        Seg::update(1, 1, n, in[u], out[u], w - from[u]);
        from[u] = w;
      }
    } else {
      read(u), read(v);
      if (in[u] <= in[v] && out[v] <= out[u]) {
        printf("%lld\n", (Seg::get(v) - back[v]) - (Seg::get(u) - back[u]));
      } else {
        printf("%lld\n", Seg::query(1, 1, n, in[u], out[u]) +
                             (Seg::get(v) - back[v]) - (Seg::get(u) - back[u]));
      }
    }
  }
  return 0;
}
