#include <bits/stdc++.h>
using namespace std;
int n, k, ansnode, num[200010], ch[200010], t;
vector<vector<int> > gr;
vector<int> val[2];
bool setans;
void dfs(int x, int par) {
  if (ch[x]) {
    ++num[x];
    if (t < k) {
      val[0].push_back(x);
    } else {
      val[1].push_back(x);
    }
    ++t;
  }
  for (auto i : gr[x]) {
    if (i == par) {
      continue;
    }
    dfs(i, x);
    num[x] += num[i];
  }
  if (num[x] >= k and !setans) {
    ansnode = x;
    setans = 1;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n >> k;
  vector<int> vi;
  gr.resize(n, vi);
  for (int i = 0; i < n - 1; ++i) {
    int u, v;
    cin >> u >> v;
    --u, --v;
    gr[u].push_back(v);
    gr[v].push_back(u);
  }
  for (int i = 0; i < 2 * k; ++i) {
    int u;
    cin >> u;
    ch[--u] = 1;
  }
  dfs(0, -1);
  cout << "1\n";
  cout << ansnode + 1 << "\n";
  for (int i = 0; i < k; ++i) {
    cout << val[0][i] + 1 << " " << val[1][i] + 1 << " " << ansnode + 1 << "\n";
  }
}
