#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
int n, k, a[maxn], sz[maxn];
vector<int> adj[maxn], ver;
void predfs(int v, int p = 0) {
  if (sz[v]) ver.push_back(v);
  for (auto u : adj[v])
    if (u != p) predfs(u, v), sz[v] += sz[u];
}
int find_c(int v, int size, int p = 0) {
  for (auto u : adj[v])
    if (u != p && sz[u] * 2 > size) return find_c(u, size, v);
  return v;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    cin >> x >> y;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  for (int i = 0; i < 2 * k; i++) {
    int x;
    cin >> x;
    sz[x]++;
  }
  predfs(1);
  int c;
  c = find_c(1, sz[1], 0);
  cout << 1 << '\n' << c << '\n';
  for (int i = 0; i < k; i++)
    cout << ver[i] << " " << ver[i + k] << " " << c << '\n';
}
