#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200000 + 10;
using namespace std;
int n, k, root = 1;
vector<int> v[MAXN], l, r;
int vis[MAXN];
void init() {
  for (int i = 0; i < MAXN; ++i) v[i].clear();
  memset(vis, 0, sizeof vis);
  l.clear();
  r.clear();
  root = 0;
}
int get_root(int x, int father) {
  int sum = vis[x];
  int len = v[x].size();
  for (int i = 0; i < len; ++i) {
    int tmp = v[x][i];
    if (tmp == father) continue;
    sum += get_root(tmp, x);
    if (root) return 0;
  }
  if (sum >= k) root = x;
  return sum;
}
void dfs(int x, int father) {
  if (vis[x]) {
    int L = l.size();
    if (L < k)
      l.push_back(x);
    else
      r.push_back(x);
  }
  int len = v[x].size();
  for (int i = 0; i < len; ++i) {
    int tmp = v[x][i];
    if (tmp == father) continue;
    dfs(tmp, x);
  }
}
int main() {
  scanf("%d%d", &n, &k);
  init();
  int x;
  for (int i = 0; i < n - 1; ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    v[a].push_back(b);
    v[b].push_back(a);
  }
  for (int i = 0; i < 2 * k; ++i) {
    scanf("%d", &x);
    vis[x] = 1;
  }
  get_root(1, -1);
  dfs(root, -1);
  printf("1\n%d\n", root);
  for (int i = 0; i < k; ++i) printf("%d %d %d\n", l[i], r[i], root);
}
