#include <bits/stdc++.h>
using namespace std;
vector<int> v[200000];
int cnt[200000];
bool chosen[200000];
vector<int> result;
int k;
void dfs(int node, int parent) {
  int count = 0;
  for (int i = 0; i < v[node].size(); i++) {
    if (v[node][i] != parent) {
      dfs(v[node][i], node);
      count += cnt[v[node][i]];
    }
  }
  if (chosen[node]) count++;
  cnt[node] = count;
  return;
}
int dfs2(int node, int parent) {
  for (int i = 0; i < v[node].size(); i++) {
    if (v[node][i] != parent && cnt[v[node][i]] >= k)
      return dfs2(v[node][i], node);
  }
  return node;
}
void dfs3(int node, int parent) {
  if (chosen[node]) result.push_back(node);
  for (int i = 0; i < v[node].size(); i++) {
    if (v[node][i] != parent) dfs3(v[node][i], node);
  }
}
int main() {
  int n;
  cin >> n >> k;
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  for (int i = 0; i < 2 * k; i++) {
    int a;
    cin >> a;
    chosen[a] = true;
  }
  dfs(1, 1);
  int node = dfs2(1, -1);
  dfs3(node, -1);
  cout << 1 << endl << node << endl;
  for (int i = 0; i < result.size() / 2; i++) {
    cout << result[i] << " " << result[i + k] << " " << node << endl;
  }
  return 0;
}
