#include <bits/stdc++.h>
using namespace std;
struct Edge {
  int to;
  int nxt;
  int head;
};
Edge edge[400005];
bool be_hometown[200005];
int n, team, x, y, ed = 1, ans, size[200005];
int top1, team1[200005];
int top2, team2[200005];
inline void add_edge(int u, int v) {
  edge[ed].to = v;
  edge[ed].nxt = edge[u].head;
  edge[u].head = ed;
  ed++;
}
inline void dfs_findroot(int now, int father) {
  if (be_hometown[now] == true) {
    size[now] = 1;
  }
  int tmp = edge[now].head;
  while (tmp > 0) {
    int son = edge[tmp].to;
    if (son == father) {
      tmp = edge[tmp].nxt;
      continue;
    }
    dfs_findroot(son, now);
    size[now] += size[son];
    if (ans > 0) {
      size[now] = 0;
      return;
    }
    tmp = edge[tmp].nxt;
  }
  if (size[now] >= team) {
    ans = now;
  }
}
inline void dfs_findteam(int now, int father) {
  if (be_hometown[now] == true) {
    if (top1 < team) {
      top1++;
      team1[top1] = now;
    } else {
      top2++;
      team2[top2] = now;
    }
  }
  int tmp = edge[now].head;
  while (tmp > 0) {
    int son = edge[tmp].to;
    if (son == father) {
      tmp = edge[tmp].nxt;
      continue;
    }
    dfs_findteam(son, now);
    tmp = edge[tmp].nxt;
  }
}
int main() {
  scanf("%d%d", &n, &team);
  for (register int i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    add_edge(x, y);
    add_edge(y, x);
  }
  for (register int i = 1; i <= 2 * team; i++) {
    scanf("%d", &x);
    be_hometown[x] = true;
  }
  dfs_findroot(1, -1);
  dfs_findteam(ans, -1);
  printf("1\n%d\n", ans);
  for (register int i = 1; i <= team; i++) {
    printf("%d %d %d\n", team1[i], team2[i], ans);
  }
  return 0;
}
