#include <bits/stdc++.h>
using namespace std;
#pragma GCC target("avx2")
#pragma GCC optimization("O2")
#pragma GCC optimization("unroll-loops")
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
const int maxn = 2e5 + 10;
set<int> adj[maxn];
int n, sub[maxn], home[maxn], k;
void dfs(int u, int par) {
  sub[u] = home[u];
  for (int v : adj[u])
    if (par - v) {
      dfs(v, u);
      sub[u] += sub[v];
    }
}
int centroid(int u, int par, int sz) {
  for (int v : adj[u])
    if (par - v)
      if (sub[v] > sz) return centroid(v, u, sz);
  return u;
}
vector<int> vec;
void dfs2(int node, int pre) {
  for (int i : adj[node]) {
    if (i == pre) continue;
    dfs2(i, node);
  }
  if (home[node]) vec.push_back(node);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(nullptr);
  cin >> n >> k;
  for (int i = 1; i < n; i++) {
    int u, v;
    cin >> u >> v;
    adj[u].insert(v);
    adj[v].insert(u);
  }
  for (int i = 0; i < 2 * k; i++) {
    int c;
    cin >> c;
    home[c] = 1;
  }
  dfs(1, 0);
  int rt = centroid(1, 0, k);
  cout << 1 << "\n";
  cout << rt << "\n";
  dfs2(rt, 0);
  for (int i = 0; i < k; i++)
    cout << vec[i] << " " << vec[i + k] << " " << rt << "\n";
}
