#include <bits/stdc++.h>
using namespace std;
const int N = 400010;
int n, m, i, j, k, l, p, t, z;
int ed, e[N], b[N], fir[N], w[N];
vector<int> li[N];
priority_queue<pair<int, int> > s;
void add(int x, int y) {
  e[++ed] = y;
  b[ed] = fir[x];
  fir[x] = ed;
}
int dfs(int i, int fa) {
  int ans = w[i], tt = w[i];
  if (w[i]) li[z].push_back(i);
  for (int k = fir[i]; k; k = b[k])
    if (e[k] != fa) {
      int res = dfs(e[k], i);
      ans += res;
      tt = max(tt, res);
    }
  if (max(tt, 2 * m - ans) < t) {
    t = max(tt, 2 * m - ans);
    p = i;
  }
  return ans;
}
int main() {
  scanf("%d%d", &n, &m);
  int x, y;
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    add(x, y);
    add(y, x);
  }
  for (int i = 1; i <= 2 * m; i++) {
    scanf("%d", &x);
    w[x]++;
  }
  t = 2 * m;
  dfs(1, 0);
  for (int k = fir[p]; k; k = b[k]) {
    z++;
    dfs(e[k], p);
    if (li[z].size() == 0)
      z--;
    else
      s.push(make_pair(li[z].size(), z));
  }
  if (w[p]) z++, li[z].push_back(p), s.push(make_pair(li[z].size(), z));
  printf("1\n%d\n", p);
  for (int k = m; k; k--) {
    pair<int, int> p2 = s.top();
    s.pop();
    pair<int, int> p1 = s.top();
    s.pop();
    printf("%d %d %d\n", li[p1.second][p1.first - 1],
           li[p2.second][p2.first - 1], p);
    if (--p1.first) s.push(p1);
    if (--p2.first) s.push(p2);
  }
  return 0;
}
