#include <bits/stdc++.h>
using namespace std;
const int mod1 = 998244353, mod = 1e9 + 7;
const int MAXN = 100005, MAXM = 200010;
long long N, K;
vector<long long> adj[MAXM];
bool soc[MAXM];
long long siz[MAXM];
void pre(long long u, long long p) {
  siz[u] = soc[u];
  for (auto v : adj[u]) {
    if (v != p) {
      pre(v, u);
      siz[u] += siz[v];
    }
  }
}
void sub(long long u, long long p, vector<long long> &vec) {
  if (soc[u]) {
    soc[u] = false;
    vec.emplace_back(u);
  }
  for (auto v : adj[u]) {
    if (v != p) {
      sub(v, u, vec);
    }
  }
}
void dfs(long long u, long long p) {
  long long bad = -1;
  for (auto v : adj[u]) {
    if (v != p) {
      if (siz[v] > K) {
        bad = v;
        break;
      }
    }
  }
  if (bad != -1) {
    dfs(bad, u);
    return;
  }
  cout << 1 << endl << u << endl;
  vector<long long> ans;
  if (soc[u]) ans.emplace_back(u);
  for (auto v : adj[u]) {
    if (v != p) {
      sub(v, u, ans);
    }
  }
  for (long long i = 1; i <= N; i++) {
    if (i != u && soc[i]) {
      ans.emplace_back(i);
    }
  }
  for (long long i = 0; i < K; i++) {
    cout << ans[i] << ' ' << ans[i + K] << ' ' << u << endl;
  }
}
void Solve() {
  cin >> N >> K;
  for (long long i = 1, u, v; i < N; i++) {
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  for (long long i = 1, x; i <= 2 * K; i++) {
    cin >> x;
    soc[x] = true;
  }
  pre(1, 1);
  dfs(1, 1);
}
signed main() {
  if (fopen(""
            ".inp",
            "r")) {
    freopen(
        ""
        ".inp",
        "r", stdin);
    freopen(
        ""
        ".out",
        "w", stdout);
  };
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long TC = 1;
  while (TC--) Solve();
  return 0;
}
