#include <bits/stdc++.h>
using namespace std;
long long n, k;
vector<long long> g[200005];
long long a[200005], sz[200005];
vector<long long> v;
void gos(long long s, long long pr) {
  sz[s] = a[s];
  for (auto i : g[s]) {
    if (i != pr) {
      gos(i, s);
      sz[s] += sz[i];
    }
  }
}
long long root;
void dfs(long long s, long long pr) {
  long long nxt = -1;
  for (auto i : g[s]) {
    if (i == pr) continue;
    if (sz[i] > k) {
      root = i;
      dfs(i, s);
      return;
    }
  }
}
void dfs2(long long s, long long pr) {
  for (auto i : g[s]) {
    if (i == pr) continue;
    dfs2(i, s);
  }
  if (a[s]) v.push_back(s);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> k;
  for (long long i = 1; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  for (long long i = 1; i <= k + k; i++) {
    long long x;
    cin >> x;
    a[x]++;
  }
  gos(1, -1);
  root = 1;
  dfs(1, -1);
  dfs2(root, -1);
  assert(v.size() == k + k);
  cout << "1\n" << root << "\n";
  for (long long i = 0; i < k; i++) {
    cout << v[i] << " " << v[i + k] << " " << root << "\n";
  }
  return 0;
}
