#include <bits/stdc++.h>
using namespace std;
int n, k, root;
vector<int> E[200005], ansl, ansr;
int vis[200005];
int dfsr(int u, int fa) {
  int sum = vis[u] ? 1 : 0;
  for (auto v : E[u]) {
    if (v == fa) continue;
    sum += dfsr(v, u);
    if (root) return 0;
  }
  if (sum >= k) root = u;
  return sum;
}
void dfs(int u, int fa) {
  if (vis[u]) {
    if (ansl.size() < k)
      ansl.push_back(u);
    else
      ansr.push_back(u);
  }
  for (auto v : E[u]) {
    if (v == fa) continue;
    dfs(v, u);
  }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1, u, v; i < n; i++) {
    scanf("%d%d", &v, &u);
    E[u].push_back(v);
    E[v].push_back(u);
  }
  for (int i = 1, x; i <= 2 * k; i++) {
    scanf("%d", &x);
    vis[x] = 1;
  }
  dfsr(1, -1);
  dfs(root, -1);
  printf("1\n%d\n", root);
  for (int i = 0; i < k; i++) printf("%d %d %d\n", ansl[i], ansr[i], root);
}
