#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 10;
int N, K;
vector<int> adj[MAXN];
bool has[MAXN];
int sub[MAXN];
void dfs0(int x, int p) {
  if (p) {
    adj[x].erase(find((adj[x]).begin(), (adj[x]).end(), p));
  }
  sub[x] = has[x];
  for (int y : adj[x]) {
    dfs0(y, x);
    sub[x] += sub[y];
  }
}
void getans(int x, vector<int> &v) {
  if (has[x]) {
    has[x] = false;
    v.push_back(x);
  }
  for (int y : adj[x]) {
    getans(y, v);
  }
}
void dfs(int x) {
  vector<int> sbs;
  for (int y : adj[x]) {
    sbs.push_back(sub[y]);
  }
  sbs.push_back(2 * K - has[x] - accumulate((sbs).begin(), (sbs).end(), 0));
  bool good = true;
  for (int s : sbs) {
    if (s > K) {
      good = false;
      break;
    }
  }
  if (!good) {
    for (int y : adj[x]) {
      dfs(y);
    }
    return;
  }
  printf("1\n%d\n", x);
  vector<int> vec;
  if (has[x]) {
    vec.push_back(x);
  }
  for (int y : adj[x]) {
    getans(y, vec);
  }
  for (int i = 1; i <= N; i++) {
    if (i != x && has[i]) {
      vec.push_back(i);
    }
  }
  for (int i = 0; i < K; i++) {
    printf("%d %d %d\n", vec[i], vec[i + K], x);
  }
  exit(0);
}
int main() {
  scanf("%d %d", &N, &K);
  for (int i = 1; i < N; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  for (int i = 1; i <= 2 * K; i++) {
    int x;
    scanf("%d", &x);
    has[x] = true;
  }
  dfs0(1, 0);
  dfs(1);
}
