#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int n, t, sz[200010], cen;
vector<int> g[200010], v;
bool mark[200010];
int dfs(int pos, int par) {
  sz[pos] = (int)mark[pos];
  bool ok = true;
  for (int i = 0; i < g[pos].size(); i++)
    if (g[pos][i] != par) {
      sz[pos] += dfs(g[pos][i], pos);
      if (sz[g[pos][i]] > t) ok = false;
    }
  if (ok && sz[pos] >= t) cen = pos;
  return sz[pos];
}
void dfs2(int pos, int par) {
  if (mark[pos]) v.push_back(pos);
  for (int i = 0; i < g[pos].size(); i++)
    if (g[pos][i] != par) dfs2(g[pos][i], pos);
}
int main() {
  cin >> n >> t;
  int x, y;
  for (int i = 0; i < n - 1; i++) {
    scanf("%d%d", &x, &y);
    g[x].push_back(y);
    g[y].push_back(x);
  }
  for (int i = 0; i < t + t; i++) {
    scanf("%d", &x);
    mark[x] = true;
  }
  dfs(1, 0);
  for (int i = 0; i < g[cen].size(); i++) dfs2(g[cen][i], cen);
  if (mark[cen]) v.push_back(cen);
  cout << 1 << endl << cen << endl;
  for (int i = 0; i < t; i++) printf("%d %d %d\n", v[i], v[i + t], cen);
  return 0;
}
