#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000, 102400000")
const double eps = 1e-8;
inline int dcmp(double a, double b) {
  if (fabs(a - b) < eps) return 0;
  return a > b ? 1 : -1;
}
const int INT_INF = 0x3f3f3f3f;
const int INT_M_INF = 0x7f7f7f7f;
const long long LL_INF = 0x3f3f3f3f3f3f3f3f;
const long long LL_M_INF = 0x7f7f7f7f7f7f7f7f;
const int dr[] = {0, 0, -1, 1, -1, -1, 1, 1};
const int dc[] = {-1, 1, 0, 0, -1, 1, -1, 1};
const int MOD = 1e9 + 7;
const double pi = acos(-1.0);
const int MAXN = 200000 + 10;
const int MAXT = 1000000 + 10;
using namespace std;
int n, k, root;
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] ? 1 : 0;
  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() {
  while (scanf("%d%d", &n, &k) == 2) {
    init();
    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) {
      int x;
      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);
    }
  }
  return 0;
}
