#include <bits/stdc++.h>
using namespace std;
vector<long long> gr[200300];
long long sz[200300];
vector<long long> res;
bool good[200300];
long long newroot = -1;
long long n, k;
void dfs1(long long v, long long p) {
  if (good[v]) sz[v]++;
  long long max_sz_nb = 0;
  for (long long u : gr[v])
    if (u != p) {
      dfs1(u, v);
      sz[v] += sz[u];
      max_sz_nb = max(max_sz_nb, sz[u]);
    }
  max_sz_nb = max(max_sz_nb, 2 * k - sz[v]);
  if (max_sz_nb <= k) newroot = v;
}
void dfs2(long long v, long long p) {
  for (long long i : gr[v])
    if (i != p) dfs2(i, v);
  if (good[v]) {
    res.push_back(v);
  }
}
int main() {
  scanf("%I64d %I64d", &n, &k);
  for (long long i = 0; i < n - 1; i++) {
    long long u, v;
    scanf("%I64d %I64d", &u, &v);
    u--, v--;
    gr[u].push_back(v);
    gr[v].push_back(u);
  }
  for (long long i = 0; i < 2 * k; i++) {
    long long u;
    scanf("%I64d", &u);
    u--;
    good[u] = true;
  }
  dfs1(0, -1);
  dfs2(newroot, -1);
  printf("1\n%I64d\n", newroot + 1);
  for (long long i = 0; i < k; i++) {
    printf("%I64d %I64d %I64d\n", res[i] + 1, res[i + k] + 1, newroot + 1);
  }
  return 0;
}
