#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const ll MOD = 1e9 + 7;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
void fail(T v) {
  cout << v << endl;
  exit(0);
}
int N, K;
vector<int> g[202020], ch, hm;
int dfs(int i, int p) {
  int c = hm[i];
  for (int e : g[i])
    if (e != p) c += dfs(e, i);
  return ch[i] = c;
}
int ok(int i, int p) {
  for (int e : g[i])
    if (e != p && ch[e] > K) return ok(e, i);
  return i;
}
void col(int i, int p, vector<int>& q) {
  if (hm[i]) q.push_back(i + 1);
  for (int e : g[i])
    if (e != p) col(e, i, q);
}
void solve() {
  cin >> N >> K;
  ch.assign(N, 0);
  hm.assign(N, 0);
  for (int i = 0; i < (int)N - 1; ++i) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  for (int i = 0; i < (int)K << 1; ++i) {
    int x;
    cin >> x;
    hm[--x] = 1;
  }
  dfs(0, -1);
  int v = ok(0, -1);
  cout << 1 << endl;
  cout << v + 1 << endl;
  vector<int> res;
  for (int e : g[v]) {
    col(e, v, res);
  }
  if (hm[v]) res.push_back(v + 1);
  for (int i = 0; i < K; i++)
    cout << res[i] << " " << res[i + K] << " " << v + 1 << "\n";
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  solve();
  return 0;
}
