#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
vector<int> G[maxn];
int val[maxn];
int val_all_sons[maxn];
int n, k;
queue<int> q1, q2;
int dfs(int u, int fa) {
  int& use = val_all_sons[u];
  int ans = 0;
  for (int i = 0; i < G[u].size(); i++) {
    int v = G[u][i];
    if (v == fa) continue;
    int tem = dfs(v, u);
    use = max(use, tem);
    ans += tem;
  }
  use = max(use, 2 * k - ans);
  return ans + val[u];
}
void dfs_city(int u, int fa) {
  if (val[u]) {
    if (q1.size() < k)
      q1.push(u);
    else
      q2.push(u);
  }
  for (int i = 0; i < G[u].size(); i++) {
    int v = G[u][i];
    if (v == fa) continue;
    dfs_city(v, u);
  }
}
int main() {
  scanf("%d%d", &n, &k);
  int u, v;
  for (int i = 0; i < n - 1; i++) {
    scanf("%d%d", &u, &v);
    G[u].push_back(v);
    G[v].push_back(u);
  }
  int a;
  for (int i = 0; i < 2 * k; i++) scanf("%d", &a), val[a] = 1;
  dfs(1, 0);
  int out;
  for (int i = 1; i <= n; i++)
    if (val_all_sons[i] <= k) out = i;
  printf("1\n%d\n", out);
  dfs_city(out, 0);
  if (q2.size()) q2.push(out);
  while (q1.size()) {
    int c1, c2;
    c1 = q1.front(), c2 = q2.front();
    printf("%d %d %d\n", c1, c2, out);
    q1.pop(), q2.pop();
  }
  return 0;
}
