#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > g;
vector<bool> y;
vector<int> f;
vector<int> ans1, ans2;
int s, m, k;
void dfc(int v, int p = -1) {
  if (y[v]) {
    if (s < k)
      ans1.push_back(v + 1);
    else
      ans2.push_back(v + 1);
    s++;
  }
  for (size_t i = 0; i < g[v].size(); i++) {
    int to = g[v][i];
    if (to == p) continue;
    dfc(to, v);
    f[v] += f[to];
    if (f[v] >= k && m == 0) m = v + 1;
  }
}
int main() {
  int n;
  cin >> n >> k;
  g.resize(n);
  y.resize(n, false);
  f.resize(n, 0);
  s = m = 0;
  int a, b;
  for (int i = 0; i < n - 1; i++) {
    cin >> a >> b;
    a--;
    b--;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  for (int i = 0; i < 2 * k; i++) {
    cin >> a;
    a--;
    y[a] = true;
    f[a]++;
  }
  dfc(0);
  cout << "1\n" << m << endl;
  for (int i = 0; i < k; i++)
    cout << ans1[i] << " " << ans2[i] << " " << m << endl;
  return 0;
}
