#include <bits/stdc++.h>
using namespace std;
template <typename T>
using v = vector<T>;
const long long inf = 4611686018427387903;
void read() {}
template <typename Arg, typename... Args>
void read(Arg& arg, Args&... args) {
  cin >> (arg);
  read(args...);
}
void print() {}
template <typename Arg, typename... Args>
void print(Arg arg, Args... args) {
  cout << (arg) << " ";
  print(args...);
}
int getInt() {
  int a;
  cin >> a;
  return a;
}
const int N = 2e5 + 1;
vector<int> t[N];
char has[N];
int amount[N];
char other[N];
int findAmount(int cur, int p) {
  amount[cur] = has[cur];
  for (int i : t[cur])
    if (i != p) amount[cur] += findAmount(i, cur);
  return amount[cur];
}
void fillElements(int cur, int p, queue<int>& toFill) {
  if (has[cur]) {
    toFill.push(cur);
    other[cur] = 1;
  }
  for (int i : t[cur])
    if (i != p) fillElements(i, cur, toFill);
}
int n, k;
void findAns(int cur, int p) {
  assert(k - amount[cur] <= k / 2);
  v<queue<int>> arr;
  priority_queue<pair<int, int>> siz;
  for (int i : t[cur])
    if (i != p && amount[i] > k / 2) {
      findAns(i, cur);
      return;
    }
  memset(other, 0, sizeof other);
  for (int i : t[cur])
    if (i != p) {
      arr.push_back(queue<int>());
      fillElements(i, cur, arr.back());
      assert(((int)arr.back().size()) == amount[i]);
      siz.push({amount[i], ((int)arr.size()) - 1});
    }
  if (has[cur]) {
    arr.push_back(queue<int>());
    arr.back().push(cur);
    siz.push({1, ((int)arr.size()) - 1});
    other[cur] = 1;
  }
  arr.push_back(queue<int>());
  for (int i = 1; i <= n; i++)
    if (other[i] == 0 && has[i]) arr.back().push(i);
  siz.push({((int)arr.back().size()), ((int)arr.size()) - 1});
  cout << 1;
  cout << endl;
  cout << cur;
  cout << endl;
  for (int i = 0; i < k / 2; i++) {
    int f = siz.top().second;
    siz.pop();
    int s = siz.top().second;
    siz.pop();
    print(arr[f].front(), arr[s].front(), cur);
    cout << endl;
    arr[f].pop();
    arr[s].pop();
    siz.push({((int)arr[f].size()), f});
    siz.push({((int)arr[s].size()), s});
  }
  assert(siz.top().first == 0);
}
void run() {
  read(n, k);
  k *= 2;
  memset(has, 0, sizeof has);
  for (int i = (1); i < (n); i++) {
    int v, u;
    read(v, u);
    t[v].push_back(u);
    t[u].push_back(v);
  }
  for (int i = (0); i < (k); i++) {
    int c;
    cin >> c;
    has[c] = 1;
  }
  memset(amount, 0, sizeof amount);
  findAmount(1, -1);
  findAns(1, -1);
}
signed main() {
  srand(time(0));
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(12);
  run();
  return 0;
}
