#include <bits/stdc++.h>
using namespace std;
const int N = 2E5 + 10;
int n, k, vis[N], root;
vector<int> e[N];
int l[N], r[N], cntl, cntr;
int getroot(int u, int f = 0) {
  int sum = vis[u];
  for (auto v : e[u])
    if (v != f) {
      sum += getroot(v, u);
      if (root) return 0;
    }
  if (sum >= k) root = u;
  return sum;
}
void dfs(int u, int f = 0) {
  if (vis[u]) {
    if (cntl < k)
      l[++cntl] = u;
    else
      r[++cntr] = u;
  }
  for (auto v : e[u])
    if (v != f) dfs(v, u);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  cin >> n >> k;
  for (int i = 2; i <= n; i++) {
    int u, v;
    cin >> u >> v;
    e[u].push_back(v), e[v].push_back(u);
  }
  for (int i = 1; i <= k << 1; i++) {
    int x;
    cin >> x;
    vis[x] = 1;
  }
  getroot(1);
  dfs(root);
  cout << "1\n" << root << "\n";
  for (int i = 1; i <= k; i++)
    cout << l[i] << " " << r[i] << " " << root << "\n";
}
