#include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7;
int OO = 1e9;
const int N = 1e5 + 10, M = N << 1;
int n, m, k, T;
int a, b, c;
struct ADJ {
  int head[N], nxt[M], to[M], cost[M], n, ne;
  void init(int nNodes) {
    ne = 0;
    n = nNodes;
    memset(head, -1, n * sizeof head[0]);
  }
  void addEdge(int f, int t, int c) {
    to[ne] = t;
    nxt[ne] = head[f];
    cost[ne] = c;
    head[f] = ne++;
  }
  void addBiEdge(int u, int v, int c) {
    addEdge(u, v, c);
    addEdge(v, u, c);
  }
} adj;
int sz[N], heavy[N], par[N], depth[N], idxNode[N], EndNode[N], value[N],
    CHhead[N];
vector<int> Tour;
vector<int> IDS[N];
void DFS(int u = 0) {
  sz[u] = 1;
  int &Hch = heavy[u] = -1;
  for (int e = adj.head[u], v; ~e && (v = adj.to[e], 1); e = adj.nxt[e]) {
    if (v == par[u]) continue;
    par[v] = u;
    depth[v] = depth[u] + 1;
    DFS(v);
    sz[u] += sz[v];
    if (Hch == -1 || sz[v] > sz[Hch]) Hch = v;
  }
}
void HLD(int u = 0, int ch = 0) {
  CHhead[u] = ch;
  idxNode[u] = (int)(Tour.size());
  Tour.push_back(u);
  if (~heavy[u]) HLD(heavy[u], ch);
  for (int e = adj.head[u], v; ~e && (v = adj.to[e], 1); e = adj.nxt[e]) {
    if (v == par[u] || v == heavy[u]) continue;
    HLD(v, v);
  }
  EndNode[u] = (int)(Tour.size()) - 1;
}
struct Node {
  vector<int> v;
  Node() { v.clear(); }
};
Node operator+(const Node l, const Node r) {
  Node ret;
  return ret;
}
struct SegmentTree {
  vector<Node> seg;
  vector<int> v;
  int n;
  void init(vector<int> &A) {
    v = A;
    n = (int)(A.size());
    seg = vector<Node>(n << 2);
    Bulid(0, n - 1, 1);
  }
  void Bulid(int l, int r, int pos) {
    if (l == r) {
      auto &vec = seg[pos].v;
      vec = IDS[v[l]];
      sort(vec.begin(), vec.end());
      return;
    }
    int mid = (l + r) >> 1;
    Bulid(l, mid, pos << 1);
    Bulid(mid + 1, r, pos << 1 | 1);
    auto &lt = seg[pos << 1].v, &rt = seg[pos << 1 | 1].v, &cur = seg[pos].v;
    merge(lt.begin(), lt.end(), rt.begin(), rt.end(),
          inserter(cur, cur.begin()));
  }
  void Query(int l, int r, int pos, int st, int en, int len,
             priority_queue<int> &pr) {
    if (st > r || en < l || st > en) return;
    if (l >= st && r <= en) {
      auto &cur = seg[pos].v;
      int x = min(len, (int)(cur.size()));
      for (int i = 0; i < x; ++i) pr.push(cur[i]);
      while ((int)(pr.size()) > len) pr.pop();
      return;
    }
    int mid = (l + r) >> 1;
    Query(l, mid, pos << 1, st, en, len, pr);
    Query(mid + 1, r, pos << 1 | 1, st, en, len, pr);
  }
} ST;
void Solve(int u, int v, int len) {
  priority_queue<int> pr;
  while (CHhead[u] != CHhead[v]) {
    if (depth[CHhead[u]] < depth[CHhead[v]]) swap(u, v);
    ST.Query(0, n - 1, 1, idxNode[CHhead[u]], idxNode[u], len, pr);
    u = par[CHhead[u]];
  }
  if (idxNode[v] < idxNode[u]) swap(u, v);
  ST.Query(0, n - 1, 1, idxNode[u], idxNode[v], len, pr);
  vector<int> ans;
  while ((int)(pr.size())) {
    ans.push_back(pr.top());
    pr.pop();
  }
  printf("%d", (int)(ans.size()));
  for (int i = (int)(ans.size()) - 1; ~i; --i) printf(" %d", ans[i]);
  puts("");
}
void clr(int n) {
  adj.init(n);
  Tour.clear();
}
int main() {
  int ID = 1;
  while (ID--) {
    scanf("%d%d%d", &n, &m, &T);
    clr(n);
    for (int i = 1; i < n; ++i) {
      int u, v, c;
      scanf("%d%d", &u, &v);
      adj.addBiEdge(u - 1, v - 1, 0);
    }
    for (int i = 0; i < m; ++i) {
      int x;
      scanf("%d", &x);
      IDS[x - 1].push_back(i + 1);
    }
    DFS();
    HLD();
    ST.init(Tour);
    while (T--) {
      int u, v, len;
      scanf("%d%d%d", &u, &v, &len);
      Solve(u - 1, v - 1, len);
    }
  }
  return 0;
}
