#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
int n, k;
vector<int> g[N];
int sp[N];
int sz[N];
int calc_sz(int u, int p) {
  sz[u] = sp[u];
  for (int v : g[u])
    if (v != p) sz[u] += calc_sz(v, u);
  return sz[u];
}
int cent(int u, int p) {
  int big = 0;
  for (int v : g[u])
    if (v != p) {
      if (sz[v] > sz[big]) big = v;
      if (sz[v] >= k) {
        return cent(v, u);
      }
    }
  return u;
}
vector<int> S;
void dfs(int u, int p) {
  for (int v : g[u])
    if (v != p) dfs(v, u);
  if (sp[u]) S.push_back(u);
}
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    g[u].push_back(v);
    g[v].push_back(u);
  }
  for (int i = 0; i < 2 * k; i++) {
    int u;
    scanf("%d", &u);
    sp[u] = 1;
  }
  int root = 1;
  while (!sp[root]) root++;
  calc_sz(root, root);
  assert(sz[root] == 2 * k);
  int c = cent(root, root);
  printf("1\n%d\n", c);
  vector<vector<int>> vec;
  if (sp[c]) vec.emplace_back(vector<int>{c});
  for (int v : g[c]) {
    dfs(v, c);
    vec.emplace_back(move(S));
    S.clear();
  }
  priority_queue<pair<int, int>> q;
  for (int i = 0; i < (int)vec.size(); i++) {
    if (!vec[i].empty()) q.emplace((int)vec[i].size(), i);
  }
  while (!q.empty()) {
    assert(q.size() >= 2);
    int i = q.top().second;
    q.pop();
    int j = q.top().second;
    q.pop();
    printf("%d %d %d\n", vec[i].back(), vec[j].back(), c);
    vec[i].pop_back();
    vec[j].pop_back();
    if (!vec[i].empty()) q.emplace((int)vec[i].size(), i);
    if (!vec[j].empty()) q.emplace((int)vec[j].size(), j);
  }
}
