#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200005;
vector<int> G[MAXN];
int sz[MAXN], c[MAXN];
int p[MAXN];
int m;
void dfs(int node, int f) {
  sz[node] = c[node];
  for (auto it : G[node])
    if (it != f) {
      dfs(it, node);
      sz[node] += sz[it];
    }
}
int getc(int node, int f, int k) {
  int w = 0, ans = -1;
  for (auto it : G[node])
    if (it != f && ans < sz[it]) ans = sz[it], w = it;
  if (ans <= k) return node;
  return getc(w, node, k);
}
void nush(int node, int f) {
  if (c[node]) p[++m] = node;
  for (auto it : G[node])
    if (it != f) nush(it, node);
}
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 1; i < n; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    G[u].push_back(v);
    G[v].push_back(u);
  }
  for (int i = 1; i <= 2 * k; ++i) {
    int x;
    scanf("%d", &x);
    c[x] = 1;
  }
  dfs(1, 0);
  int c = getc(1, 0, k);
  nush(c, 0);
  printf("1\n%d\n", c);
  for (int i = 1; i <= k; ++i) printf("%d %d %d\n", p[i], p[i + k], c);
  return 0;
}
