#include <bits/stdc++.h>
using namespace std;
const int M = 1e5 + 5;
const int S = 18;
int head[M], fa[M][S], n, ec = 0, m, q, dep[M];
struct node {
  int to, nex;
} e[M << 1];
struct Node {
  int s[10];
  int len;
  Node() { len = 0; }
  void insert(int x) { s[len++] = x; }
  void print() {
    printf("len %d:", len);
    for (int i = 0; i < len; i++) printf("%d ", s[i]);
    puts("");
  }
} p[M], mx[M][S], t;
void Add_edge(int a, int b) {
  e[ec] = (node){b, head[a]};
  head[a] = ec++;
  e[ec] = (node){a, head[b]};
  head[b] = ec++;
}
Node Merge(Node A, Node B, int c) {
  int i = 0, j = 0, k = 0, a = A.len, b = B.len;
  Node w;
  while (w.len < c && i < a && j < b) {
    if (A.s[i] < B.s[j])
      w.insert(A.s[i++]);
    else if (B.s[j] < A.s[i])
      w.insert(B.s[j++]);
    else
      w.insert(B.s[j++]), i++;
  }
  while (i < a && w.len < c) w.insert(A.s[i++]);
  while (j < b && w.len < c) w.insert(B.s[j++]);
  return w;
}
void dfs(int x, int f, int d) {
  dep[x] = d;
  fa[x][0] = f;
  mx[x][0] = Merge(p[x], p[f], 10);
  for (int i = head[x]; ~i; i = e[i].nex) {
    int y = e[i].to;
    if (y == f) continue;
    dfs(y, x, d + 1);
  }
}
Node Query(int a, int b, int c) {
  Node res;
  if (dep[a] < dep[b]) swap(a, b);
  res = Merge(res, p[a], c);
  int i, step = dep[a] - dep[b];
  for (i = S - 1; i >= 0; i--) {
    if (step & (1 << i)) res = Merge(res, mx[a][i], c), a = fa[a][i];
  }
  if (a == b) return res;
  Node ans = Merge(ans, p[b], c);
  for (i = S - 1; i >= 0; i--) {
    if (fa[a][i] != fa[b][i]) {
      res = Merge(res, mx[a][i], c);
      ans = Merge(ans, mx[b][i], c);
      a = fa[a][i], b = fa[b][i];
    }
  }
  res = Merge(res, mx[a][0], c);
  ans = Merge(ans, mx[b][0], c);
  return Merge(res, ans, c);
}
int main() {
  memset(head, -1, sizeof(head));
  int a, b, c, i, j, k;
  scanf("%d %d %d", &n, &m, &q);
  for (i = 1; i < n; i++) {
    scanf("%d %d", &a, &b);
    Add_edge(a, b);
  }
  for (i = 1; i <= m; i++) {
    scanf("%d", &a);
    if (p[a].len < 10) p[a].insert(i);
  }
  dfs(1, 1, 0);
  for (i = 1; i < S && (1 << i) <= n; i++) {
    for (j = 1; j <= n; j++) {
      fa[j][i] = fa[fa[j][i - 1]][i - 1];
      mx[j][i] = Merge(mx[j][i - 1], mx[fa[j][i - 1]][i - 1], 10);
    }
  }
  while (q--) {
    scanf("%d %d %d", &a, &b, &c);
    t = Query(a, b, c);
    int sz = t.len;
    printf("%d ", t.len);
    for (i = 0; i < sz; i++) printf("%d ", t.s[i]);
    puts("");
  }
  return 0;
}
