#include <bits/stdc++.h>
using namespace std;
vector<int> a[200005], b;
set<int> c1;
int n, k, p, f[200005], x[200005], c[200005], c2[200005];
int getdeepth(int i) {
  for (vector<int>::iterator j = a[i].begin(); j != a[i].end(); j++)
    if ((*j) != f[i]) {
      f[*j] = i;
      int x = getdeepth(*j);
      c[i] += c[*j];
      if (c[*j] >= k) return x;
    }
  return i;
}
void getdeepth1(int i) {
  for (vector<int>::iterator j = a[i].begin(); j != a[i].end(); j++)
    if ((*j) != f[i]) getdeepth1(*j);
  if (c2[i]) b.push_back(i), c1.erase(i);
}
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  cin >> n >> k;
  for (int i = 1, j, l; i < n; i++) {
    cin >> j >> l;
    a[j].push_back(l);
    a[l].push_back(j);
  }
  for (int i = 1, j; i <= 2 * k; i++) {
    cin >> j;
    c[j] = c2[j] = 1;
    c1.insert(j);
  }
  p = getdeepth(1);
  getdeepth1(p);
  for (set<int>::iterator i = c1.begin(); i != c1.end(); i++) b.push_back(*i);
  cout << 1 << endl << p << endl;
  for (int i = 0; i < k; i++)
    cout << b[i] << ' ' << b[i + k] << ' ' << p << endl;
  return 0;
}
