#include <bits/stdc++.h>
using namespace std;
template <class A, class B>
inline bool mina(A &x, B y) {
  return (x > y) ? (x = y, 1) : 0;
}
template <class A, class B>
inline bool maxa(A &x, B y) {
  return (x < y) ? (x = y, 1) : 0;
}
vector<int> people[(100005)];
vector<int> merge(vector<int> a, vector<int> b, int bound) {
  vector<int> res;
  int p1 = 0, p2 = 0;
  while (p1 < ((int)(a).size()) && p2 < ((int)(b).size()) && bound) {
    if (a[p1] < b[p2]) {
      res.push_back(a[p1++]);
    } else {
      res.push_back(b[p2++]);
    }
    bound--;
  }
  while (p1 < ((int)(a).size()) && bound) res.push_back(a[p1++]), bound--;
  while (p2 < ((int)(b).size()) && bound) res.push_back(b[p2++]), bound--;
  return res;
}
class Jumper {
 public:
  vector<int> depths;
  vector<vector<int>> parents;
  vector<vector<vector<int>>> V;
  int N, root, max_lvl;
  Jumper(int root_, vector<vector<int>> graph) {
    root = root_;
    N = graph.size();
    depths.resize(N);
    max_lvl = 1;
    while ((1 << max_lvl) < N) max_lvl++;
    V.resize(max_lvl, vector<vector<int>>(N));
    parents.resize(max_lvl, vector<int>(N));
    build_lca(root, -1, graph, 0);
    for (int i = 1; i < max_lvl; i++)
      for (int j = 0; j < N; j++)
        if (parents[i - 1][j] != -1) {
          parents[i][j] = parents[i - 1][parents[i - 1][j]];
          V[i][j] = merge(V[i - 1][j], V[i - 1][parents[i - 1][j]], 10);
        }
  }
  vector<int> res;
  int lca(int u, int v, int bound) {
    if (depths[u] < depths[v]) swap(u, v);
    int diff_dep = depths[u] - depths[v];
    for (int i = 0; i < max_lvl; i++)
      if ((1 << i) & diff_dep) {
        res = merge(res, V[i][u], bound);
        u = parents[i][u];
      }
    if (u == v) {
      res = merge(res, V[0][u], bound);
      return u;
    }
    for (int i = max_lvl - 1; i >= 0; i--) {
      if (parents[i][u] != parents[i][v]) {
        res = merge(res, V[i][u], bound);
        res = merge(res, V[i][v], bound);
        u = parents[i][u];
        v = parents[i][v];
      }
    }
    res = merge(res, V[0][u], bound);
    res = merge(res, V[0][v], bound);
    res = merge(res, V[0][parents[0][u]], bound);
    return parents[0][u];
  }
  int get_depth(int u) { return depths[u]; }
  vector<int> cal(int u, int v, int a) {
    res.clear();
    lca(u, v, a);
    return res;
  }

 private:
  void build_lca(int at, int par, vector<vector<int>> &adj, int dep) {
    for (int p : people[at]) {
      V[0][at].push_back(p);
    }
    parents[0][at] = par;
    depths[at] = dep;
    for (auto v : adj[at]) {
      if (v != par) {
        build_lca(v, at, adj, dep + 1);
      }
    }
  }
};
int main() {
  int N, M, Q;
  scanf("%d %d %d", &N, &M, &Q);
  vector<vector<int>> adj;
  adj.resize(N, vector<int>());
  int u, v;
  for (int(i) = 0; (i) < (N - 1); ++(i)) {
    scanf("%d %d", &u, &v);
    u--, v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  int a;
  for (int(i) = 0; (i) < (M); ++(i)) {
    scanf("%d", &a);
    a--;
    people[a].push_back(i + 1);
  }
  for (int(i) = 0; (i) < (N); ++(i)) {
    sort(people[i].begin(), people[i].end());
    people[i].resize(min(10, ((int)(people[i]).size())));
  }
  Jumper jump(0, adj);
  for (int(q) = 0; (q) < (Q); ++(q)) {
    scanf("%d %d %d", &u, &v, &a);
    u--, v--;
    vector<int> ans = jump.cal(u, v, a);
    printf("%d", ((int)(ans).size()));
    for (int u : ans) printf(" %d", u);
    printf("\n");
  }
  return 0;
}
