func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 2e5 + 5;   const long long INF = 1e17, LINF = 1e12;   int n, m, q, x, y;   vector<int> g[N], s[N];   int top[N], p[N], dp[N], son[N], sz, d[N];   int tin1[N], tin2[N], tout[N], timer, num[N];   pair<long long, int> og[N];   pair<long long, int> t[4 * N];   long long ob[4 * N];   void dfs(int v, int pr = 0, int depth = 0) {     d[v] = depth;     p[v] = pr;     dp[v] = 1;     for (int to : g[v]) {       if (to != pr) {         dfs(to, v, depth + 1);         dp[v] += dp[to];         if (dp[to] > dp[son[v]]) {           son[v] = to;         }       }     }   }   void hld(int v, int pr = 0) {     tin1[v] = ++timer;     og[timer] = make_pair(INF, 0);     for (auto it : s[v]) {       timer++;       og[timer] = make_pair(it, it);       num[it] = timer;     }     tin2[v] = timer;     if (son[v]) {       top[son[v]] = top[v];       hld(son[v], v);     }     for (int to : g[v]) {       if (to != pr && to != son[v]) {         top[to] = to;         hld(to, v);       }     }     tout[v] = timer;   }   void build(int v, int l, int r) {     if (l == r) {       t[v] = og[l];       return;     }     int mid = (r + l) >> 1;     build(v + v, l, mid);     build(v + v + 1, mid + 1, r);     t[v] = min(t[v + v], t[v + v + 1]);   }   inline void push(int v) {     if (ob[v]) {       ob[v + v] += ob[v];       ob[v + v + 1] += ob[v];       t[v + v].first += ob[v];       t[v + v + 1].first += ob[v];       ob[v] = 0;     }   }   void update(int v, int l, int r, int tl, int tr, long long val) {     if (l > r || l > tr || tl > r) {       return;     }     if (tl <= l && r <= tr) {       t[v].first += val;       ob[v] += val;       return;     }     push(v);     int mid = (r + l) >> 1;     update(v + v, l, mid, tl, tr, val);     update(v + v + 1, mid + 1, r, tl, tr, val);     t[v] = min(t[v + v], t[v + v + 1]);   }   pair<long long, int> get(int v, int l, int r, int tl, int tr) {     if (l > r || l > tr || tl > r) {       return make_pair(INF, 0);     }     if (tl <= l && r <= tr) {       return t[v];     }     push(v);     int mid = (r + l) >> 1;     return min(get(v + v, l, mid, tl, tr), get(v + v + 1, mid + 1, r, tl, tr));   }   pair<long long, int> get(int x, int y) {     pair<long long, int> mn = make_pair(INF, 1e9);     while (top[x] != top[y]) {       if (d[top[x]] > d[top[y]]) {         mn = min(mn, get(1, 1, timer, tin1[top[x]], tin2[x]));         x = p[top[x]];       } else {         mn = min(mn, get(1, 1, timer, tin1[top[y]], tin2[y]));         y = p[top[y]];       }     }     if (d[x] > d[y]) {       swap(x, y);     }     mn = min(mn, get(1, 1, timer, tin1[x], tin2[y]));     return mn;   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     cin >> n >> m >> q;     for (int i = 1; i < n; i++) {       cin >> x >> y;       g[x].push_back(y);       g[y].push_back(x);     }     for (int i = 1; i <= m; i++) {       cin >> x;       s[x].push_back(i);     }     dfs(1);     top[1] = 1;     hld(1);     build(1, 1, timer);     while (q--) {       int t;       cin >> t;       if (t == 1) {         int x, y, k;         cin >> x >> y >> k;         vector<int> ans;         while (k) {           auto it = get(x, y);           if (it.first >= INF) {             break;           }           k--;           ans.push_back(it.second);           update(1, 1, timer, num[it.second], num[it.second], INF);         }         cout << ans.size() <<    ;         for (auto it : ans) {           cout << it <<    ;         }         cout <<   n ;       } else {         int x, y;         cin >> x >> y;         update(1, 1, timer, tin1[x], tout[x], y);       }     }   }   