#include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
const int N = 1e6 + 10;
const long long mod = 1e9 + 7;
const long long mod2 = 998244353;
const long long inf = 8e18;
const int LOG = 22;
long long pw(long long a, long long b, long long M) {
  return (!b ? 1
             : (b & 1 ? (a * pw(a * a % M, b / 2, M)) % M
                      : pw(a * a % M, b / 2, M)));
}
int St[N], sub[N], mark[N], node[N], ptr, n, k;
vector<int> G[N];
bool cmp(int i, int j) { return St[i] < St[j]; }
void pre(int v, int P) {
  St[v] = ++ptr;
  sub[v] = mark[v];
  for (auto u : G[v]) {
    if (u == P) continue;
    pre(u, v);
    sub[v] += sub[u];
  }
}
int find(int v, int P) {
  for (auto u : G[v]) {
    if (u == P) continue;
    if (sub[u] > (k >> 1)) return find(u, v);
  }
  return v;
}
int main() {
  scanf("%d%d", &n, &k);
  k <<= 1;
  for (int i = 1; i < n; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    G[a].push_back(b);
    G[b].push_back(a);
  }
  for (int i = 1; i <= k; i++) {
    scanf("%d", &node[i]);
    mark[node[i]] = 1;
  }
  pre(1, 0);
  sort(node + 1, node + k + 1, cmp);
  int v = find(1, 0);
  printf("1\n%d\n", v);
  for (int i = 1; i <= (k >> 1); i++) {
    printf("%d %d %d\n", node[i], node[i + (k >> 1)], v);
  }
  return 0;
}
