#include <bits/stdc++.h> // 多源头广度优先遍历! using namespace std; int main() { int n, m, u, v; cin >> n >> m; vector<vector<int>> tree(n + 1, vector<int>()); vector<bool> vis(n + 1, false); for (int i = 1; i <= n - 1; i++) { cin >> u >> v; tree[u].push_back(v); } int k, e; cin >> k; // 特殊点的个数! queue<int> q; for (int i = 1; i <= k; i++) { cin >> e; vis[e] = true; q.push(e); } multiset<int> ret; while (!q.empty()) { int size = q.size(); if (m == -1) break; while (size--) { int pop = q.front(); q.pop(); ret.insert(pop); for (auto next : tree[pop]) { if (!vis[next]) { q.push(next); vis[next] = true; } } } m--; } cout << ret.size() << endl; for (auto val : ret) cout << val << " "; return 0; }