#include <bits/stdc++.h>
using namespace std;
vector<int> V[300000];
vector<int> T;
int n, k, centr;
bool tab[300000];
int pod[300000];
void read() {
  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;
    tab[a] = 1;
  }
}
void DFS_pod(int a, int p) {
  for (unsigned int i = 0; i < V[a].size(); i++) {
    int tmp = V[a][i];
    if (tmp != p) DFS_pod(tmp, a);
  }
  if (tab[a]) pod[a]++;
  pod[p] += pod[a];
}
int DFS_centr(int a, int p) {
  int res = a;
  for (unsigned int i = 0; i < V[a].size(); i++) {
    int tmp = V[a][i];
    if (tmp != p && pod[tmp] > k) res = DFS_centr(tmp, a);
  }
  return res;
}
void DFS_nr(int a, int p) {
  if (tab[a]) T.push_back(a);
  for (unsigned int i = 0; i < V[a].size(); i++) {
    int tmp = V[a][i];
    if (tmp != p) DFS_nr(tmp, a);
  }
}
void solve() {
  DFS_pod(1, 0);
  centr = DFS_centr(1, 0);
  if (tab[centr]) T.push_back(centr);
  for (unsigned int i = 0; i < V[centr].size(); i++) {
    int tmp = V[centr][i];
    DFS_nr(tmp, centr);
  }
}
void write() {
  cout << "1" << endl;
  cout << centr << endl;
  for (int i = 0; i < k; i++)
    cout << T[i] << " " << T[i + k] << " " << centr << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  read();
  solve();
  write();
}
