#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using ld = long double;
using vvi = vector<vi>;
using vb = vector<bool>;
constexpr int INF = 1e9 + 1;
constexpr bool LOG = false;
void Log() {
  if (LOG) cerr << "\n";
}
template <class T, class... S>
void Log(T t, S... s) {
  if (LOG) cerr << t << "\t", Log(s...);
}
using T = vi;
int A = 10;
T op(const T &l, const T &r) {
  if (r.size() == 0) return l;
  if (l.size() == 0) return r;
  T a;
  a.reserve(l.size() + r.size());
  merge(l.begin(), l.end(), r.begin(), r.end(), back_inserter(a));
  if (int(a.size()) > A) a.resize(A);
  return a;
}
T ident = vi();
struct SegmentTree {
  struct Node {
    T val;
    int l, r;
    Node(T _val, int _l, int _r) : val(_val), l(_l), r(_r){};
  };
  int n;
  vector<Node> tree;
  SegmentTree(int p, vvi &init) : n(1 << p) {
    tree.assign(2 * n, Node(ident, 0, n - 1));
    for (int j = 1; j < n; ++j) {
      int m = (tree[j].l + tree[j].r) / 2;
      tree[2 * j].l = tree[j].l;
      tree[2 * j].r = m;
      tree[2 * j + 1].l = m + 1;
      tree[2 * j + 1].r = tree[j].r;
    }
    for (int j = 2 * n - 1; j > 0; --j) {
      if (j >= n)
        tree[j].val = j - n >= int(init.size()) ? vi() : init[j - n];
      else
        tree[j].val = op(tree[2 * j].val, tree[2 * j + 1].val);
    }
  }
  void update(int i, T val) {
    for (tree[i + n].val = val, i = (i + n) / 2; i > 0; i /= 2)
      tree[i].val = op(tree[2 * i].val, tree[2 * i + 1].val);
  }
  T query(int l, int r) {
    T lhs = T(ident), rhs = T(ident);
    for (l += n, r += n; l < r; l >>= 1, r >>= 1) {
      if (l & 1) lhs = op(lhs, tree[l++].val);
      if (!(r & 1)) rhs = op(tree[r--].val, rhs);
    }
    return op(l == r ? op(lhs, tree[l].val) : lhs, rhs);
  }
};
struct HLD {
  int V, t;
  vi &p;
  vvi &childs;
  vi pr, size, heavy;
  vi t_in, t_out, ts;
  vi path;
  vi pi;
  vector<vvi> pathcontent;
  vector<SegmentTree> sts;
  HLD(vvi &childs, vi &p, vvi &init, int root = 0)
      : V(p.size()),
        t(0),
        p(p),
        childs(childs),
        pr(V, -1),
        size(V, -1),
        heavy(V, -1),
        t_in(V, -1),
        t_out(V, -1),
        path(V, -1),
        pi(V, -1) {
    Log("tsort...");
    tsort(root);
    Log("set sizes...");
    set_sizes();
    Log("build segtrees...");
    set_sts(init);
    Log("done");
  }
  void tsort(int r) {
    stack<int> s;
    s.push(r);
    while (!s.empty()) {
      int u = s.top();
      s.pop();
      t_in[u] = ++t;
      ts.push_back(u);
      for (auto v : childs[u]) s.push(v);
    }
  }
  void set_sizes() {
    vi s(V, 0);
    for (auto it = ts.rbegin(); it != ts.rend(); ++it) {
      int u = *it;
      s[u] = 1;
      pair<int, int> m{-1, -1};
      auto &cs = childs[u];
      for (auto v : cs) s[u] += s[v], m = max(m, {s[v], v});
      heavy[u] = m.second;
      t_out[u] = cs.size() > 0 ? t_out[cs[0]] : t_in[u];
    }
  }
  void set_sts(const vvi &init) {
    for (auto u : ts) {
      if (u != 0 && u == heavy[p[u]])
        pr[u] = pr[p[u]], pi[u] = pi[p[u]] + 1, path[u] = path[p[u]],
        pathcontent[path[u]].push_back(init[u]);
      else
        pr[u] = u, pi[u] = 0, path[u] = pathcontent.size(),
        pathcontent.push_back({init[u]});
      Log("u, pr[u], path[u], pi[u]", u, pr[u], path[u], pi[u]);
    }
    Log("creating segtrees....");
    for (auto x : pathcontent) {
      int s = 32 - __builtin_clz(x.size() - 1);
      Log("s,size", 1 << s, x.size());
      sts.push_back(SegmentTree(s, x));
    }
  }
  bool is_parent(int p, int u) {
    return t_in[p] <= t_in[u] && t_out[p] >= t_out[u];
  }
  int lca(int u, int v) {
    while (!is_parent(pr[v], u)) v = p[pr[v]];
    while (!is_parent(pr[u], v)) u = p[pr[u]];
    return is_parent(u, v) ? u : v;
  }
  T query_in(int u, int l) {
    if (u < 0) return {};
    if (path[u] == path[l]) return sts[path[u]].query(pi[l], pi[u]);
    return op(sts[path[u]].query(0, pi[u]), query_in(p[pr[u]], l));
  }
  T query_ex(int u, int l) {
    Log("QEX", u, l, path[u], path[l]);
    if (u < 0) return {};
    if (path[u] == path[l]) return sts[path[u]].query(pi[l] + 1, pi[u]);
    auto q1 = sts[path[u]].query(0, pi[u]);
    Log("QEX: u, pi[u]", u, pi[u]);
    auto q2 = query_ex(p[pr[u]], l);
    return op(q1, q2);
  }
  T query(int u, int v) {
    auto l = lca(u, v);
    Log("u,v,l", u, v, l);
    auto q1 = query_in(u, l);
    auto q2 = query_ex(v, l);
    Log("u,l (in)");
    Log("v,l (ex)");
    return op(q1, q2);
  }
};
vvi g;
vi p;
vvi c;
void dfs(int u, int pp) {
  p[u] = pp;
  for (auto v : g[u])
    if (v != pp) c[u].push_back(v), dfs(v, u);
}
ll read() {
  int x;
  scanf("%d", &x);
  return x;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int N = read(), M = read(), Q = read();
  g.resize(N);
  p.resize(N, -1);
  c.resize(N);
  for (auto i = decltype(N - 1)(0); i < (N - 1); i++) {
    int u = read(), v = read();
    --u, --v;
    g[u].push_back(v), g[v].push_back(u);
  }
  dfs(0, -1);
  vvi vals(N);
  for (auto i = decltype(M)(0); i < (M); i++) {
    int x = read();
    vals[x - 1].push_back(i + 1);
  }
  for (auto &v : vals)
    sort(v.begin(), v.end()), v.resize(min(v.size(), size_t(A)));
  HLD hld(c, p, vals);
  for (auto q = decltype(Q)(0); q < (Q); q++) {
    int u = read(), v = read(), a = read();
    A = a;
    --u, --v;
    auto r = hld.query(u, v);
    if (a < int(r.size())) r.resize(a);
    cout << r.size();
    for (auto x : r) cout << " " << x;
    cout << "\n";
  }
  return 0;
}
