#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, m, q;
vector<int> adj[N];
vector<int> people[N];
int tt;
int st[N], en[N];
int lca[19][N];
vector<int> p[19][N];
void dfs(int node, int par) {
  st[node] = ++tt;
  lca[0][node] = par;
  for (int i = 1; i < 19; i++) {
    lca[i][node] = lca[i - 1][lca[i - 1][node]];
  }
  vector<int> v = people[node];
  v.insert(v.end(), people[par].begin(), people[par].end());
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
  if (v.size() > 10) v.resize(10);
  p[0][node] = v;
  for (int i = 1; i < 19; i++) {
    vector<int> para = p[i - 1][node];
    if (lca[i - 1][node] != node)
      para.insert(para.end(), p[i - 1][lca[i - 1][node]].begin(),
                  p[i - 1][lca[i - 1][node]].end());
    sort(para.begin(), para.end());
    para.erase(unique(para.begin(), para.end()), para.end());
    if (para.size() > 10) para.resize(10);
    p[i][node] = para;
  }
  for (auto to : adj[node]) {
    if (to != par) dfs(to, node);
  }
  en[node] = ++tt;
}
bool check(int a, int b) { return st[a] < st[b] && en[a] > en[b]; }
void output(int l, int r, int a) {
  if (l == r) {
    cout << min(a, (int)people[l].size()) << " ";
    for (int i = 0; i < min(a, (int)people[l].size()); i++) {
      cout << people[l][i] << " ";
    }
    cout << "\n";
    return;
  }
  vector<int> v;
  for (int i = 18; ~i; i--) {
    if (!check(lca[i][l], r)) {
      v.insert(v.end(), p[i][l].begin(), p[i][l].end());
      sort(v.begin(), v.end());
      v.erase(unique(v.begin(), v.end()), v.end());
      if (v.size() > 10) v.resize(10);
      l = lca[i][l];
    }
  }
  for (int i = 18; ~i; i--) {
    if (!check(lca[i][r], l)) {
      v.insert(v.end(), p[i][r].begin(), p[i][r].end());
      sort(v.begin(), v.end());
      v.erase(unique(v.begin(), v.end()), v.end());
      if (v.size() > 10) v.resize(10);
      r = lca[i][r];
    }
  }
  if (l != r) {
    v.insert(v.end(), p[0][l].begin(), p[0][l].end());
    v.insert(v.end(), p[0][r].begin(), p[0][r].end());
    sort(v.begin(), v.end());
    v.erase(unique(v.begin(), v.end()), v.end());
    if (v.size() > 10) v.resize(10);
  }
  cout << min((int)v.size(), a) << " ";
  for (int i = 0; i < min((int)v.size(), a); i++) cout << v[i] << " ";
  cout << "\n";
}
void solve() {
  cin >> n >> m >> q;
  for (int i = 1; i < n; i++) {
    int a, b;
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  for (int i = 1; i <= m; i++) {
    int a;
    cin >> a;
    people[a].push_back(i);
  }
  for (int i = 1; i <= n; i++) {
    sort(people[i].begin(), people[i].end());
    if (people[i].size() > 10) people[i].resize(10);
  }
  dfs(1, 1);
  while (q--) {
    int l, r, a;
    cin >> l >> r >> a;
    output(l, r, a);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  solve();
  return 0;
}
