#include <bits/stdc++.h>
using namespace std;
const int NMax = 100010;
int N, M, Q;
vector<int> G[NMax];
vector<int> people[NMax];
int euler[200010], height[200010], first[100010];
int lg[200010], rmq[18][200010];
int tata[NMax];
bool viz[NMax];
int level[NMax];
int K;
int viz2[NMax];
void DFS(int nod, int nivel, int from) {
  level[nod] = nivel;
  K++;
  euler[K] = nod;
  height[K] = nivel;
  first[nod] = K;
  for (vector<int>::iterator it = G[nod].begin(); it != G[nod].end(); it++) {
    if (*it == from) continue;
    DFS(*it, nivel + 1, nod);
    K++;
    euler[K] = nod;
    height[K] = nivel;
  }
}
void LG2() {
  int i;
  for (i = 2; i <= K; i++) {
    lg[i] = lg[i >> 1] + 1;
  }
}
void RMQ() {
  int i, j, lim;
  for (i = 1; i <= K; i++) rmq[0][i] = i;
  for (i = 1; (1 << i) <= K; i++) {
    lim = K - (1 << i) + 1;
    for (j = 1; j <= lim; j++) {
      rmq[i][j] = rmq[i - 1][j];
      if (height[rmq[i][j]] > height[rmq[i - 1][j + (1 << (i - 1))]])
        rmq[i][j] = rmq[i - 1][j + (1 << (i - 1))];
    }
  }
}
inline int lca(int x, int y) {
  int poz, dif, l;
  x = first[x];
  y = first[y];
  if (x > y) swap(x, y);
  dif = y - x + 1;
  l = lg[dif];
  poz = rmq[l][x];
  if (height[poz] > height[rmq[l][x + dif - (1 << l)]])
    poz = rmq[l][x + dif - (1 << l)];
  return euler[poz];
}
void DFS2(int node, int father) {
  viz[node] = true;
  tata[node] = father;
  for (vector<int>::iterator it = G[node].begin(); it != G[node].end(); ++it) {
    if (!viz[*it]) DFS2(*it, node);
  }
}
int anc[19][NMax];
vector<int> ancpeople[19][NMax];
void InterclasareAncestors(vector<int> &A, vector<int> &B, vector<int> &C,
                           int limit = 10) {
  C.clear();
  int sza = A.size();
  int szb = B.size();
  int i, j, k;
  i = j = k = 0;
  while (i < sza && j < szb) {
    if (A[i] == B[j]) {
      ++i;
      continue;
    }
    if (A[i] < B[j]) {
      C.push_back(A[i]);
      ++i;
    } else {
      C.push_back(B[j]);
      ++j;
    }
    if (C.size() == limit) return;
  }
  while (i < sza) {
    C.push_back(A[i]);
    ++i;
    if (C.size() == limit) return;
  }
  while (j < szb) {
    C.push_back(B[j]);
    ++j;
    if (C.size() == limit) return;
  }
}
void Precalc() {
  DFS(1, 0, -1);
  LG2();
  RMQ();
  for (int i = 1; i <= N; ++i) sort(people[i].begin(), people[i].end());
  DFS2(1, 0);
  for (int i = 1; i <= N; ++i) {
    anc[0][i] = tata[i];
    InterclasareAncestors(people[i], people[tata[i]], ancpeople[0][i]);
  }
  for (int i = 1; i <= 17; ++i) {
    for (int j = 1; j <= N; ++j) {
      anc[i][j] = anc[i - 1][anc[i - 1][j]];
    }
  }
  for (int i = 1; i <= 17; ++i) {
    for (int j = 1; j <= N; ++j) {
      int u, v;
      u = j;
      v = anc[i - 1][j];
      InterclasareAncestors(ancpeople[i - 1][u], ancpeople[i - 1][v],
                            ancpeople[i][j]);
    }
  }
}
void GetAns(int x, int l, vector<int> &ans, int a) {
  ans.clear();
  int dif = abs(level[l] - level[x]);
  for (int i = 17; i >= 0; --i) {
    if (dif & (1 << i)) {
      vector<int> ansaux;
      InterclasareAncestors(ancpeople[i][x], ans, ansaux, a);
      ans = ansaux;
      x = anc[i][x];
    }
  }
}
void Solve(int u, int v, int a) {
  if (u == v) {
    vector<int> ans;
    for (int i = 0; i < min(a, (int)people[u].size()); ++i)
      ans.push_back(people[u][i]);
    cout << ans.size() << " ";
    for (int i = 0; i < ans.size(); ++i) cout << ans[i] << " ";
    cout << "\n";
    return;
  }
  int l = lca(u, v);
  if (l == u) {
    vector<int> ans;
    GetAns(v, l, ans, a);
    cout << ans.size() << " ";
    for (int i = 0; i < ans.size(); ++i) cout << ans[i] << " ";
    cout << "\n";
    return;
  }
  if (l == v) {
    vector<int> ans;
    GetAns(u, l, ans, a);
    cout << ans.size() << " ";
    for (int i = 0; i < ans.size(); ++i) cout << ans[i] << " ";
    cout << "\n";
    return;
  }
  vector<int> ans, ans2;
  GetAns(u, l, ans, a);
  GetAns(v, l, ans2, a);
  vector<int> ansaux;
  InterclasareAncestors(ans2, ans, ansaux, a);
  ans = ansaux;
  cout << ans.size() << " ";
  for (int i = 0; i < ans.size(); ++i) cout << ans[i] << " ";
  cout << "\n";
  return;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  cin >> N >> M >> Q;
  for (int i = 1; i < N; ++i) {
    int x, y;
    cin >> x >> y;
    G[x].push_back(y);
    G[y].push_back(x);
  }
  for (int i = 1; i <= M; ++i) {
    int c;
    cin >> c;
    people[c].push_back(i);
  }
  Precalc();
  for (int i = 1; i <= Q; ++i) {
    int u, v, a;
    cin >> u >> v >> a;
    Solve(u, v, a);
  }
  return 0;
}
