#include <bits/stdc++.h>
using namespace std;
vector<int> AdjList[200007], team[2];
int town[200007], child[200007], n, k, city, cnt;
void dfs(int u, int fa = -1) {
  if (town[u]) {
    cnt++;
    if (cnt > k)
      team[0].push_back(u);
    else
      team[1].push_back(u);
  }
  for (int i = 0; i < AdjList[u].size(); i++) {
    int v = AdjList[u][i];
    if (v == fa) continue;
    dfs(v, u);
    child[u] += child[v];
    if (child[u] >= k && !city) city = u;
  }
}
int main() {
  cin >> n >> k;
  int u, v;
  for (int i = 1; i < n; i++) {
    cin >> u >> v;
    AdjList[u].push_back(v);
    AdjList[v].push_back(u);
  }
  for (int i = 1; i <= 2 * k; i++) {
    cin >> u;
    town[u] = 1;
    child[u] = 1;
  }
  dfs(1);
  cout << 1 << endl << city << endl;
  for (int i = 0; i < k; i++) {
    cout << team[0][i] << " " << team[1][i] << " " << city << endl;
  }
}
