#include <bits/stdc++.h>
using namespace std;
const int N = 200007;
int n, k, sub[N], dub[N], center;
vector<int> edge[N];
void dfs(int at, int past) {
  sub[at] = dub[at];
  for (auto u : edge[at]) {
    if (u == past) continue;
    dfs(u, at);
    sub[at] += sub[u];
  }
}
int get(int at, int past) {
  for (auto u : edge[at]) {
    if (u == past) continue;
    if (sub[u] > k) return get(u, at);
  }
  return at;
}
vector<int> Q;
void add(int at, int past) {
  if (dub[at]) Q.push_back(at);
  for (auto u : edge[at])
    if (u != past) add(u, at);
}
int main() {
  int x, y;
  scanf("%d %d", &n, &k);
  for (int i = 1; i <= n - 1; i++) {
    scanf("%d %d", &x, &y);
    edge[x].push_back(y);
    edge[y].push_back(x);
  }
  for (int i = 1; i <= 2 * k; i++) {
    scanf("%d", &x);
    dub[x] = 1;
  }
  dfs(1, -1);
  center = get(1, -1);
  dfs(center, -1);
  printf("1\n%d\n", center);
  add(center, -1);
  for (int i = 0; i < k; i++) printf("%d %d %d\n", Q[i], Q[i + k], center);
  return 0;
}
