#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
int n, k, rt, a[N], edgenum, head[N], Next[N * 2], vet[N * 2];
vector<int> l, r;
void add(int u, int v) {
  edgenum++;
  Next[edgenum] = head[u];
  vet[edgenum] = v;
  head[u] = edgenum;
}
int dfs2(int u, int fa) {
  int sum = a[u];
  for (int e = head[u]; e; e = Next[e]) {
    int v = vet[e];
    if (v == fa) continue;
    sum += dfs2(v, u);
    if (rt) return 0;
  }
  if (sum >= k) rt = u;
  return sum;
}
void dfs(int u, int fa) {
  if (a[u]) {
    if (l.size() < k)
      l.push_back(u);
    else
      r.push_back(u);
  }
  for (int e = head[u]; e; e = Next[e]) {
    int v = vet[e];
    if (v == fa) continue;
    dfs(v, u);
  }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    add(u, v);
    add(v, u);
  }
  for (int i = 1; i <= 2 * k; i++) {
    int u;
    scanf("%d", &u);
    a[u] = 1;
  }
  dfs2(1, -1);
  dfs(rt, -1);
  puts("1");
  printf("%d\n", rt);
  for (int i = 0; i < k; i++) printf("%d %d %d\n", l[i], r[i], rt);
  return 0;
}
