#include <bits/stdc++.h>
using namespace std;
const int N = 200100;
struct node {
  int next, to;
} e[2 * N];
int head[N], tot = 0, sz[N], is[N], ans[2 * N], top = 0, n, m, c[N], rt;
void add(int x, int y) {
  e[++tot].next = head[x];
  head[x] = tot;
  e[tot].to = y;
}
void dfs(int x, int f) {
  int i, y;
  if (c[x] == 1) sz[x] = 1;
  for (i = head[x]; i; i = e[i].next)
    if ((y = e[i].to) != f) {
      dfs(y, x);
      sz[x] += sz[y];
      if (sz[y] > m) is[x] = y;
    }
}
int go(int x) {
  if (!is[x]) return x;
  return go(is[x]);
}
void dfs2(int x, int f) {
  int i, y;
  if (c[x] == 1) ans[++top] = x;
  for (i = head[x]; i; i = e[i].next)
    if ((y = e[i].to) != f) dfs2(y, x);
}
int main() {
  int i, j, k, x, y;
  printf("1\n");
  scanf("%d%d", &n, &m);
  for (i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    add(x, y);
    add(y, x);
  }
  for (i = 1; i <= 2 * m; i++) {
    scanf("%d", &x);
    c[x] = 1;
  }
  dfs(1, 0);
  rt = go(1);
  printf("%d\n", rt);
  dfs2(rt, 0);
  for (i = 1; i <= m; i++) printf("%d %d %d\n", ans[i], ans[m + i], rt);
  return 0;
}
