#include <bits/stdc++.h>
using namespace std;
int n, m, q;
vector<int> G[100001];
struct node {
  int num[11], len;
  void merge(node x, node& y) {
    int i = 0, j = 0;
    int s1 = x.len, s2 = y.len;
    len = 0;
    while (len < 10 && i < s1 && j < s2)
      if (x.num[i] < y.num[j])
        num[len++] = x.num[i++];
      else
        num[len++] = y.num[j++];
    while (i < s1 && len < 10) num[len++] = x.num[i++];
    while (j < s2 && len < 10) num[len++] = y.num[j++];
  }
} pos[100001][20], ans, s[100001];
int fa[100001][20], dep[100001];
void dfs(int v, int f, int d) {
  dep[v] = d;
  pos[v][0].merge(pos[v][0], s[v]);
  for (int i = 0; i < G[v].size(); i++) {
    int u = G[v][i];
    if (u == f) continue;
    fa[u][0] = v;
    dfs(u, v, d + 1);
  }
}
void Up(int& x, int step) {
  for (int i = 0; i < 20; i++)
    if ((1 << i) & step) {
      ans.merge(ans, pos[x][i]);
      x = fa[x][i];
    }
}
void LCA(int x, int y) {
  if (dep[x] > dep[y]) swap(x, y);
  Up(y, dep[y] - dep[x]);
  if (x == y) {
    ans.merge(ans, s[x]);
    return;
  }
  for (int i = 19; i >= 0; i--)
    if (fa[x][i] != fa[y][i]) {
      ans.merge(ans, pos[x][i]);
      ans.merge(ans, pos[y][i]);
      x = fa[x][i], y = fa[y][i];
    }
  ans.merge(ans, pos[x][1]);
  ans.merge(ans, pos[y][0]);
}
int main() {
  while (~scanf("%d%d%d", &n, &m, &q)) {
    for (int i = 1; i <= n; i++) {
      G[i].clear();
      pos[i][0].len = s[i].len = 0;
    }
    for (int i = 1, c, d; i < n; i++) {
      scanf("%d%d", &c, &d);
      G[c].push_back(d);
      G[d].push_back(c);
    }
    for (int i = 1, c; i <= m; i++) {
      scanf("%d", &c);
      if (s[c].len < 10) s[c].num[s[c].len++] = i;
    }
    dfs(1, 0, 1);
    for (int i = 1; i < 20; i++)
      for (int j = 1; j <= n; j++) {
        fa[j][i] = fa[fa[j][i - 1]][i - 1];
        pos[j][i].merge(pos[j][i - 1], pos[fa[j][i - 1]][i - 1]);
      }
    for (int i = 1; i <= q; i++) {
      int x, y, a;
      scanf("%d%d%d", &x, &y, &a);
      ans.len = 0;
      LCA(x, y);
      int sz = ans.len;
      sz = min(sz, a);
      printf("%d", sz);
      for (int j = 0; j < sz; j++) printf(" %d", ans.num[j]);
      puts("");
    }
  }
  return 0;
}
