#include <bits/stdc++.h>
const int N = 2e5 + 5;
const long long MOD = 998244353;
using namespace std;
int n, k, res;
int d[N], cs[N], dp[N];
vector<int> a[N];
stack<int> A[N];
void dfs(int u, int pre) {
  int maxx = 0;
  for (int i = (0); i < (int)(a[u].size()); ++i) {
    int v = a[u][i];
    if (pre == v) continue;
    dfs(v, u);
    maxx = max(maxx, dp[v]);
    dp[u] += dp[v];
  }
  dp[u] += d[u];
  if (maxx <= k && 2 * k - dp[u] <= k) res = u;
}
void dfs2(int u, int t, int pre) {
  if (d[u]) A[t].push(u);
  for (int i = (0); i < (int)(a[u].size()); ++i) {
    int v = a[u][i];
    if (v == pre) continue;
    dfs2(v, t, u);
  }
}
void xuly() {
  cin >> n >> k;
  for (int i = (1); i < (int)(n); ++i) {
    int u, v;
    cin >> u >> v;
    a[u].push_back(v);
    a[v].push_back(u);
  }
  for (int i = (1); i <= (int)(2 * k); ++i) {
    int u;
    cin >> u;
    d[u] = 1;
  }
  dfs(1, -1);
  set<pair<int, int> > s;
  set<pair<int, int>, greater<pair<int, int> > > ss;
  if (d[res]) {
    A[1].push(res);
    s.insert({1, 1});
    ss.insert({1, 1});
  }
  for (int i = (0); i < (int)(a[res].size()); ++i) {
    int v = a[res][i];
    dfs2(v, i + 2, res);
    if (A[i + 2].size() == 0) continue;
    s.insert({A[i + 2].size(), i + 2});
    ss.insert({A[i + 2].size(), i + 2});
  }
  cout << 1 << '\n';
  cout << res << '\n';
  while (ss.size()) {
    pair<int, int> e = *ss.begin(), ee = *s.begin();
    ss.erase(e);
    ss.erase(ee);
    s.erase(e);
    s.erase(ee);
    ee.first--;
    e.first--;
    cout << A[e.second].top() << " " << A[ee.second].top() << " " << res
         << '\n';
    A[e.second].pop();
    A[ee.second].pop();
    if (e.first != 0) ss.insert(e), s.insert(e);
    if (ee.first != 0) ss.insert(ee), s.insert(ee);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  xuly();
}
