func_code_string: #include <bits/stdc++.h>   using namespace std;   vector<int> v[200005];   int CR, n, k, sz[200005], target[200005], cented[200005];   void getsize(int now, int pre) {     sz[now] = (target[now] == 1);     for (int i = 0; i < v[now].size(); i++) {       int next = v[now][i];       if (next == pre || cented[next]) continue;       getsize(next, now);       sz[now] += sz[next];     }   }   int getcent(int now, int pre, int R) {     for (int i = 0; i < v[now].size(); i++) {       int next = v[now][i];       if (next == pre || cented[next]) continue;       if (sz[next] > sz[R] / 2) return getcent(next, now, R);     }     return now;   }   priority_queue<pair<int, int> > pq;   int centdfs(int now) {     getsize(now, -1);     int cc = getcent(now, -1, now);     cented[cc] = 1;     if (CR == -1) CR = cc;     return cc;   }   int gcnt = 0;   vector<int> tmp[200005];   void go(int now, int pre) {     if (target[now]) tmp[gcnt].push_back(now);     for (int i = 0; i < v[now].size(); i++) {       int next = v[now][i];       if (next == pre) continue;       go(next, now);     }   }   int main() {     CR = -1;     scanf( %d %d , &n, &k);     for (int a, b, i = 0; i < n - 1; i++) {       scanf( %d %d , &a, &b);       v[a].push_back(b);       v[b].push_back(a);     }     for (int i = 1; i <= k; i++) {       for (int t, j = 0; j < 2; j++) {         scanf( %d , &t);         target[t] = 1;       }     }     centdfs(1);     printf( 1 n%d n , CR);     for (int i = 0; i < v[CR].size(); i++) {       ++gcnt;       go(v[CR][i], CR);       if (tmp[gcnt].empty()) continue;       pq.push(make_pair((int)tmp[gcnt].size(), gcnt));     }     while (!pq.empty()) {       pair<int, int> p = pq.top();       pq.pop();       if ((int)pq.size() == 0) {         printf( %d %d %d n , tmp[p.second].back(), CR, CR);         break;       }       pair<int, int> p2 = pq.top();       pq.pop();       printf( %d %d %d n , tmp[p.second].back(), tmp[p2.second].back(), CR);       tmp[p.second].pop_back();       tmp[p2.second].pop_back();       if (--p.first != 0) {         pq.push(p);       }       if (--p2.first != 0) {         pq.push(p2);       }     }   }   