#include <bits/stdc++.h>
using namespace std;
int n, k, startnode, ansnode;
vector<int> sz, mark, lleft, rright;
vector<vector<int> > g;
int getSize(int node = startnode, int par = -1) {
  sz[node] = mark[node];
  for (int i = 0; i < (int)g[node].size(); i++) {
    int to = g[node][i];
    if (to != par) sz[node] += getSize(to, node);
  }
  return sz[node];
}
int findCentroid(int node = startnode, int par = -1) {
  for (int i = 0; i < (int)g[node].size(); i++) {
    int to = g[node][i];
    if (to != par && sz[to] > k) return findCentroid(to, node);
  }
  return node;
}
void findNodes(int node = ansnode, int par = -1) {
  if (mark[node] && (int)lleft.size() < k && node != ansnode)
    lleft.push_back(node);
  else if (mark[node] && node != ansnode)
    rright.push_back(node);
  for (int i = 0; i < (int)g[node].size(); i++) {
    int to = g[node][i];
    if (to != par) findNodes(to, node);
  }
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr);
  cin >> n >> k;
  g.resize(n + 1);
  sz.resize(n + 1);
  mark.resize(n + 1, 0);
  for (int i = 0; i < n - 1; i++) {
    int from, to;
    cin >> from >> to;
    g[from].push_back(to);
    g[to].push_back(from);
  }
  for (int i = 0; i < 2 * k; i++) {
    int node;
    cin >> node;
    mark[node] = 1;
  }
  for (int i = 1; i <= n; i++)
    if ((int)g[i].size() == 1) startnode = i;
  getSize();
  ansnode = findCentroid();
  findNodes();
  if (mark[ansnode]) rright.push_back(ansnode);
  cout << 1 << '\n' << ansnode << '\n';
  for (int i = 0; i < k; i++)
    cout << lleft[i] << ' ' << rright[i] << ' ' << ansnode << '\n';
  return 0;
}
