#include <bits/stdc++.h>
using namespace std;
const int maxn = 200000 + 5;
vector<int> G[maxn];
int sz[maxn], son[maxn];
int f[maxn];
int vis[maxn];
int n, k;
vector<int> ans[2];
void dfs(int v, int fa) {
  for (int u : G[v]) {
    if (u == fa) {
      continue;
    }
    dfs(u, v);
    sz[v] += sz[u];
    son[v] = max(son[v], sz[u]);
  }
  son[v] = max(son[v], k * 2 - sz[v]);
}
void func(int v, int fa, int c) {
  if (!vis[v] && ans[c - 1].size() < k && f[v]) {
    vis[v] = 1;
    ans[c - 1].push_back(v);
  }
  for (int u : G[v]) {
    if (fa == u) continue;
    func(u, v, c);
  }
}
int main(int argc, char const *argv[]) {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n - 1; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    G[u].push_back(v);
    G[v].push_back(u);
  }
  for (int i = 0; i < k * 2; i++) {
    int v;
    scanf("%d", &v);
    f[v] = sz[v] = 1;
  }
  dfs(1, 0);
  int node = 0;
  for (int i = 1; i <= n; i++) {
    if (son[i] <= k) {
      node = i;
    }
  }
  for (int v : G[node]) {
    if (ans[0].size() < k) {
      func(v, node, 1);
    }
    if (ans[0].size() == k) {
      func(v, node, 2);
    }
  }
  if (f[node]) {
    ans[1].push_back(node);
  }
  printf("1\n%d\n", node);
  for (int i = 0; i < k; i++) {
    printf("%d %d %d\n", ans[0][i], ans[1][i], node);
  }
  return 0;
}
