#include <bits/stdc++.h>
using namespace std;
vector<int> v[100005], city[100005];
vector<int> luu[100005][17];
int tin[100005], tout[100005], par[100005][17];
int dtime, maxbit;
inline vector<int> gop(vector<int> a, vector<int> b) {
  vector<int> res;
  int i, j, sza = a.size(), szb = b.size();
  for (i = 0, j = 0; (i < sza || j < szb);) {
    if (i == sza)
      res.push_back(b[j++]);
    else if (j == szb)
      res.push_back(a[i++]);
    else if (a[i] < b[j])
      res.push_back(a[i++]);
    else
      res.push_back(b[j++]);
  }
  int sz = unique(res.begin(), res.end()) - res.begin();
  res.resize(((10) < (sz) ? (10) : (sz)));
  return res;
}
inline void dfs(int x, int g) {
  par[x][0] = g;
  luu[x][0] = gop(city[x], city[g]);
  tin[x] = ++dtime;
  for (typeof(v[x].begin()) ite = v[x].begin(); ite != v[x].end(); ite++)
    if (*ite != g) dfs(*ite, x);
  tout[x] = dtime;
}
inline bool is_parent(int x, int y) {
  return tin[x] <= tin[y] && tout[y] <= tout[x];
}
inline void qr(int x, int y, int z) {
  int i;
  vector<int> res;
  if (x == y)
    res = city[x];
  else if (is_parent(x, y)) {
    for ((i) = (maxbit - 1); (i) >= 0; (i)--)
      if (!is_parent(par[y][i], x)) res = gop(res, luu[y][i]), y = par[y][i];
    res = gop(res, luu[y][0]);
  } else if (is_parent(y, x)) {
    for ((i) = (maxbit - 1); (i) >= 0; (i)--)
      if (!is_parent(par[x][i], y)) res = gop(res, luu[x][i]), x = par[x][i];
    res = gop(res, luu[x][0]);
  } else {
    for ((i) = (maxbit - 1); (i) >= 0; (i)--)
      if (!is_parent(par[y][i], x)) res = gop(res, luu[y][i]), y = par[y][i];
    for ((i) = (maxbit - 1); (i) >= 0; (i)--)
      if (!is_parent(par[x][i], y)) res = gop(res, luu[x][i]), x = par[x][i];
    res = gop(res, luu[x][0]);
    res = gop(res, luu[y][0]);
  }
  res.resize(((z) < (res.size()) ? (z) : (res.size())));
  printf("%d", res.size());
  for (typeof(res.begin()) ite = res.begin(); ite != res.end(); ite++)
    printf(" %d", *ite);
  printf("\n");
}
inline void input() {
  int n, nm, nq, x, y, z, i, j;
  scanf("%d %d %d", &n, &nm, &nq);
  for ((i) = (2); (i) <= (n); (i)++) {
    scanf("%d %d", &x, &y);
    v[x].push_back(y), v[y].push_back(x);
  }
  for ((i) = (1); (i) <= (nm); (i)++) {
    scanf("%d", &x);
    city[x].push_back(i);
  }
  for ((i) = (1); (i) <= (n); (i)++)
    if (city[i].size() > 10) city[i].resize(10);
  dtime = 0;
  dfs(1, 1);
  for (maxbit = 0; 1 << maxbit <= n; maxbit++)
    ;
  for (j = 1; j < maxbit; j++)
    for ((i) = (1); (i) <= (n); (i)++) {
      par[i][j] = par[par[i][j - 1]][j - 1];
      luu[i][j] = gop(luu[i][j - 1], luu[par[i][j - 1]][j - 1]);
    }
  while (nq--) {
    scanf("%d %d %d", &x, &y, &z);
    qr(x, y, z);
  }
}
int main() {
  input();
  return 0;
}
