#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
vector<int> adj[N];
stack<int> st[N];
int subtree[N], arr[N];
void dfs(int v, int p) {
  subtree[v] = arr[v];
  for (auto c : adj[v]) {
    if (c == p) continue;
    dfs(c, v);
    subtree[v] += subtree[c];
  }
}
int dfs2(int v, int p, int h) {
  for (auto c : adj[v]) {
    if (c == p) continue;
    if (subtree[c] >= h) return dfs2(c, v, h);
  }
  return v;
}
void dfs3(int v, int p, int x) {
  if (arr[v]) {
    st[x].push(v);
  }
  for (auto c : adj[v]) {
    if (c == p) continue;
    dfs3(c, v, x);
  }
}
int main() {
  int n, k, u, v;
  scanf("%d %d", &n, &k);
  for (int i = 1; i < n; i++) {
    scanf("%d %d", &u, &v);
    adj[u].push_back(v), adj[v].push_back(u);
  }
  for (int i = 1; i <= 2 * k; i++) {
    scanf("%d", &u);
    arr[u]++;
  }
  dfs(1, 0);
  v = dfs2(1, 0, (2 * k + 1) / 2);
  int m = 0;
  for (auto c : adj[v]) {
    m++;
    dfs3(c, v, m);
  }
  if (arr[v]) {
    m++;
    st[m].push(v);
  }
  printf("1\n%d\n", v);
  priority_queue<pair<int, int>> pq;
  for (int i = 1; i <= m; i++) {
    pq.push({st[i].size(), i});
  }
  int a1, b1, a2, b2;
  int x, y;
  k *= 2;
  while (k > 0) {
    a1 = pq.top().first, b1 = pq.top().second;
    pq.pop();
    if (pq.empty()) {
      assert(a1 == 0);
      break;
    }
    a2 = pq.top().first, b2 = pq.top().second;
    pq.pop();
    if (a1 == 0 && a2 == 0) continue;
    assert(a2 != 0);
    x = st[b1].top(), y = st[b2].top();
    st[b1].pop(), st[b2].pop();
    pq.push({a1 - 1, b1});
    pq.push({a2 - 1, b2});
    k -= 2;
    printf("%d %d %d\n", x, y, v);
  }
  return 0;
}
