#include <bits/stdc++.h>
using namespace std;
const int maxn = 200001;
struct node {
  int to;
  int nxt;
} g[maxn * 2];
int k, rt;
int h[maxn], son[maxn], out[maxn][2], len[2];
bool c[maxn];
void vAdd(int i, int u, int v) {
  g[i].to = v;
  g[i].nxt = h[u];
  h[u] = i;
}
void dfsrt(int id, int fa) {
  int i, nxt;
  son[id] = c[id];
  for (i = h[id]; i; i = g[i].nxt) {
    nxt = g[i].to;
    if (fa == nxt) continue;
    dfsrt(nxt, id);
    if (rt) return;
    son[id] += son[nxt];
  }
  if (son[id] >= k) rt = id;
}
void dfs(int id, int fa) {
  int i, nxt;
  if (c[id]) {
    if (len[0] < k)
      out[++len[0]][0] = id;
    else
      out[++len[1]][1] = id;
  }
  for (i = h[id]; i; i = g[i].nxt) {
    nxt = g[i].to;
    if (fa == nxt) continue;
    dfs(nxt, id);
  }
}
int main() {
  int i, n, u, v;
  scanf("%d%d", &n, &k);
  for (i = 1; i < n; i++) {
    scanf("%d%d", &u, &v);
    vAdd(i * 2 - 1, u, v);
    vAdd(i * 2, v, u);
  }
  for (i = 1; i <= k * 2; i++) {
    scanf("%d", &u);
    c[u] = true;
  }
  dfsrt(1, 0);
  dfs(rt, 0);
  printf("1\n%d\n", rt);
  for (i = 1; i <= k; i++) printf("%d %d %d\n", out[i][0], out[i][1], rt);
  return 0;
}
