#include <bits/stdc++.h>
using namespace std;
const int N = 200000 + 77;
int n, k, sub[N], C, par[N], cur = 1;
bool M[N];
vector<int> a[N], V[N];
priority_queue<pair<int, int> > pq;
void dfs_Pre(int v) {
  for (int u : a[v]) {
    if (u == par[v]) {
      continue;
    }
    par[u] = v;
    dfs_Pre(u);
    sub[v] += sub[u];
  }
  sub[v] += M[v];
}
int Centroid(int v = 1) {
  for (int u : a[v]) {
    if (u == par[v]) {
      continue;
    }
    if (sub[u] > (k >> 1)) {
      return Centroid(u);
    }
  }
  return v;
}
void dfs(int v) {
  if (M[v]) {
    V[cur].push_back(v);
  }
  for (int u : a[v]) {
    if (u == par[v] || u == C) {
      continue;
    }
    if (v == C) {
      ++cur;
    }
    dfs(u);
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  k <<= 1;
  for (int i = 1; i < n; i++) {
    int v, u;
    cin >> v >> u;
    a[v].push_back(u);
    a[u].push_back(v);
  }
  for (int i = 1; i <= k; i++) {
    int x;
    cin >> x;
    M[x] = 1;
  }
  dfs_Pre(1);
  C = Centroid();
  dfs(C);
  ++cur;
  if (C > 1) {
    dfs(1);
  }
  for (int i = 1; i <= n; i++) {
    if ((int)V[i].size() > 0) {
      pq.push(make_pair((int)V[i].size(), i));
    }
  }
  cout << "1\n" << C << '\n';
  while (!pq.empty()) {
    int x = pq.top().second;
    pq.pop();
    int y = pq.top().second;
    pq.pop();
    cout << V[x].back() << ' ' << V[y].back() << ' ' << C << '\n';
    V[x].pop_back();
    V[y].pop_back();
    if (!V[x].empty()) {
      pq.push(make_pair((int)V[x].size(), x));
    }
    if (!V[y].empty()) {
      pq.push(make_pair((int)V[y].size(), y));
    }
  }
  return 0;
}
