#include <bits/stdc++.h>
using namespace std;
class heavy_light_decomposition {
  const int n;
  vector<vector<int>> g;
  vector<int> in, out, size, head, par;
  int it;
  void erase_par(int v, int prev) {
    par[v] = prev;
    for (auto& u : g[v]) {
      if (u == g[v].back()) break;
      if (u == prev) swap(u, g[v].back());
      erase_par(u, v);
    }
    g[v].pop_back();
  }
  void dfs1(int v) {
    for (auto& u : g[v]) {
      dfs1(u);
      size[v] += size[u];
      if (size[u] > size[g[v][0]]) swap(u, g[v][0]);
    }
  }
  void dfs2(int v) {
    in[v] = it++;
    for (auto u : g[v]) {
      head[u] = (u == g[v][0] ? head[v] : u);
      dfs2(u);
    }
    out[v] = it;
  }

 public:
  heavy_light_decomposition(int n_)
      : n(n_),
        g(n),
        in(n, -1),
        out(n, -1),
        size(n, 1),
        head(n),
        par(n, -1),
        it(0) {}
  void add_edge(int u, int v) {
    g[u].push_back(v);
    g[v].push_back(u);
  }
  void build(int rt = 0) {
    for (auto v : g[rt]) erase_par(v, rt);
    dfs1(rt);
    head[rt] = rt;
    dfs2(rt);
  }
  int get_id(int v) { return in[v]; }
  void path_query(int u, int v, function<void(int, int)> f) {
    while (true) {
      if (in[u] > in[v]) swap(u, v);
      f(max(in[head[v]], in[u]), in[v] + 1);
      if (head[u] == head[v]) return;
      v = par[head[v]];
    }
  }
};
const int MAX = 1 << 17;
vector<int> segs[MAX << 1];
void add(int p, int id) { segs[MAX + p].push_back(id); }
void init() {
  for (int i = MAX; i < MAX * 2; i++) {
    if ((int)segs[i].size() > 10) {
      segs[i].resize(10);
    }
  }
  for (int i = MAX - 1; i > 0; i--) {
    int l = i << 1, r = l | 1;
    merge(segs[l].begin(), segs[l].end(), segs[r].begin(), segs[r].end(),
          back_inserter(segs[i]));
    if ((int)segs[i].size() > 10) {
      segs[i].resize(10);
    }
  }
}
int it;
int res[1 << 17];
void get(int l, int r) {
  for (l += MAX, r += MAX; l < r; l >>= 1, r >>= 1) {
    if (l & 1) {
      for (auto v : segs[l]) res[it++] = v;
      ++l;
    }
    if (r & 1) {
      --r;
      for (auto v : segs[r]) res[it++] = v;
    }
  }
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  int n, m, q;
  cin >> n >> m >> q;
  heavy_light_decomposition hl(n);
  for (int i = 0; i < n - 1; i++) {
    int v, u;
    cin >> v >> u;
    --v, --u;
    hl.add_edge(v, u);
  }
  hl.build();
  for (int i = 0; i < m; i++) {
    int v;
    cin >> v;
    --v;
    add(hl.get_id(v), i + 1);
  }
  init();
  while (q--) {
    int v, u, a;
    cin >> v >> u >> a;
    --v, --u;
    it = 0;
    hl.path_query(v, u, [&](int l, int r) { get(l, r); });
    if (a < it) {
      nth_element(res, res + a, res + it);
      it = a;
    }
    sort(res, res + it);
    printf("%d", it);
    for (int i = 0; i < it; i++) {
      printf(" %d", res[i]);
    }
    puts("");
  }
  return 0;
}
