#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 2;
int n, m, k;
int ans[maxn];
struct Edge {
  int to, nxt;
};
Edge edge[maxn << 1];
int cnt, head[maxn];
void addedge(int u, int v) {
  cnt++;
  edge[cnt].to = v;
  edge[cnt].nxt = head[u];
  head[u] = cnt;
}
int tot = 0;
int son[maxn];
bool fa[maxn];
void dfs(int u, int father) {
  if (fa[u]) ans[tot++] = u;
  for (int i = head[u]; ~i; i = edge[i].nxt) {
    int v = edge[i].to;
    if (v == father) continue;
    dfs(v, u);
    son[u] += son[v];
    if (son[u] >= k && !m) m = u;
  }
}
void init() {
  cnt = 0;
  memset(head, -1, sizeof(head));
}
int main() {
  init();
  scanf("%d%d", &n, &k);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    addedge(u, v);
    addedge(v, u);
  }
  for (int i = 1; i <= 2 * k; i++) {
    int x;
    scanf("%d", &x);
    fa[x] = true;
    son[x] = 1;
  }
  dfs(1, -1);
  printf("1\n%d\n", m);
  for (int i = 0; i < k; i++) printf("%d %d %d\n", ans[i], ans[i + k], m);
  return 0;
}
