#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MAX = 4e5 + 100;
const ll inf = 1e9;
const ll mod = 1e9 + 7;
ll n, k, sz[MAX], x[MAX], col[MAX];
vector<ll> adj[MAX];
ll cen;
vector<pair<ll, ll> > aux;
void centroid(ll u, ll f) {
  sz[u] = x[u];
  bool go = true;
  for (ll v : adj[u]) {
    if (v == f) continue;
    centroid(v, u);
    sz[u] += sz[v];
    if (sz[v] > k) go = false;
  }
  if (2 * k - sz[u] > k) go = false;
  if (go) cen = u;
}
void dfs(ll u, ll f) {
  if (x[u]) aux.push_back({col[u], u});
  for (ll v : adj[u]) {
    if (v == f) continue;
    if (u != cen) col[v] = col[u];
    dfs(v, u);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ll u, v;
  cin >> n >> k;
  for (ll i = 1; i < (ll)n; i++) {
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  for (ll i = 0; i < (ll)2 * k; i++) {
    cin >> u;
    x[u] = 1;
  }
  centroid(1, 0);
  ll c = 1;
  for (ll v : adj[cen]) col[v] = c++;
  dfs(cen, 0);
  sort(aux.begin(), aux.end());
  cout << "1\n";
  cout << cen << endl;
  for (ll i = 0; i < (ll)k; i++) {
    cout << aux[i].second << " " << aux[i + k].second << " " << cen << endl;
  }
  return 0;
}
