#include <bits/stdc++.h>
using namespace std;
const int N_MAX = 200002;
int n, k;
vector<int> edges[N_MAX];
int subSize[N_MAX];
bool isTeam[N_MAX];
void dfs(int node, int parent = -1) {
  subSize[node] = isTeam[node];
  for (int u : edges[node])
    if (u != parent) {
      dfs(u, node);
      subSize[node] += subSize[u];
    }
}
int searchCentroid(int node, int parent = -1) {
  int maxSubSize = 2 * k - subSize[node];
  for (int u : edges[node])
    if (u != parent) {
      int c = searchCentroid(u, node);
      if (c != -1) return c;
      maxSubSize = max(maxSubSize, subSize[u]);
    }
  if (maxSubSize > k) return -1;
  return node;
}
int centroid;
vector<int> v;
void findTeams(int node, int parent) {
  if (isTeam[node] == true) v.push_back(node);
  for (int u : edges[node])
    if (u != parent) findTeams(u, node);
}
int main() {
  cin >> n >> k;
  for (int i = 1; i < n; i++) {
    int u, v;
    cin >> u >> v;
    edges[u].push_back(v);
    edges[v].push_back(u);
  }
  for (int i = 1; i <= 2 * k; i++) {
    int team;
    cin >> team;
    isTeam[team] = true;
  }
  dfs(1);
  centroid = searchCentroid(1);
  for (int u : edges[centroid]) findTeams(u, centroid);
  if (isTeam[centroid]) v.push_back(centroid);
  cout << "1\n" << centroid << "\n";
  for (int i = 0; i < k; i++)
    cout << v[i] << " " << v[i + k] << " " << centroid << "\n";
  return 0;
}
