#include <bits/stdc++.h>
using namespace std;
vector<long long> v[200001], l, r;
bool vis[200001];
long long n, k, u, vv, rt;
inline long long read() {
  long long sum = 0, x = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') x = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    sum = sum * 10 + ch - '0';
    ch = getchar();
  }
  return sum * x;
}
inline void write(long long x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
  return;
}
inline long long fdrt(long long x, long long f) {
  long long s = vis[x], len = v[x].size();
  for (register long long i = 0; i < len; ++i) {
    long long t = v[x][i];
    if (t == f) continue;
    s += fdrt(t, x);
    if (rt) return 0;
  }
  if (s >= k) rt = x;
  return s;
}
inline void dfs(long long x, long long f) {
  if (vis[x]) {
    if (l.size() < k)
      l.push_back(x);
    else
      r.push_back(x);
  }
  long long len = v[x].size();
  for (register long long i = 0; i < len; ++i) {
    long long t = v[x][i];
    if (t == f) continue;
    dfs(t, x);
  }
}
signed main() {
  n = read();
  k = read();
  for (register long long i = 1; i < n; ++i) {
    u = read();
    vv = read();
    v[u].push_back(vv);
    v[vv].push_back(u);
  }
  for (register long long i = 1; i <= k << 1; ++i) {
    u = read();
    vis[u] = 1;
  }
  long long sr = fdrt(1, -1);
  dfs(rt, -1);
  write(1);
  putchar('\n');
  write(rt);
  putchar('\n');
  for (register long long i = 0; i < k; ++i) {
    write(l[i]);
    putchar(' ');
    write(r[i]);
    putchar(' ');
    write(rt);
    putchar('\n');
  }
  return 0;
}
