#include <bits/stdc++.h>
using namespace std;
ifstream fin("a.in");
vector<int> G[200010], v[200010], ans, ans2;
int n, k, s[200010], a[200010], dr;
priority_queue<pair<int, int> > S;
void df(int nod, int dad) {
  for (vector<int>::iterator it = G[nod].begin(); it != G[nod].end(); it++) {
    if (*it != dad) {
      df(*it, nod);
      s[nod] += s[*it];
    }
  }
}
void dfs(int nod, int dad) {
  if (a[nod] == 1) v[dr].push_back(nod);
  for (vector<int>::iterator it = G[nod].begin(); it != G[nod].end(); it++) {
    if (*it == dad) continue;
    dfs(*it, nod);
  }
}
int main() {
  int i, x, y;
  cin >> n >> k;
  for (i = 1; i < n; i++) {
    cin >> x >> y;
    G[x].push_back(y);
    G[y].push_back(x);
  }
  for (i = 1; i <= 2 * k; i++) {
    cin >> x;
    s[x]++;
    a[x]++;
  }
  df(1, 0);
  int nod, dad, nr;
  nod = 1;
  dad = 0;
  do {
    s[0] = 0;
    nr = 0;
    for (vector<int>::iterator it = G[nod].begin(); it != G[nod].end(); it++) {
      if (*it == dad) continue;
      if (s[*it] > s[nr]) nr = *it;
    }
    if (s[nr] > k) {
      dad = nod;
      nod = nr;
    } else {
      break;
    }
  } while (true);
  dr = 0;
  cout << "1\n" << nod << "\n";
  for (vector<int>::iterator it = G[nod].begin(); it != G[nod].end(); it++) {
    ++dr;
    dfs(*it, nod);
    S.push(make_pair(v[dr].size(), dr));
  }
  for (i = 1; i <= k; i++) {
    pair<int, int> p, p2;
    int val;
    p = S.top();
    S.pop();
    val = v[p.second].back();
    v[p.second].pop_back();
    cout << val << " ";
    p.first--;
    p2 = p;
    p = S.top();
    S.pop();
    if (v[p.second].size())
      val = v[p.second].back();
    else
      val = nod;
    v[p.second].pop_back();
    cout << val << " " << nod << "\n";
    p.first--;
    S.push(p2);
    S.push(p);
  }
}
