#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const double eps = 1e-8;
const double PI = acos(-1.0);
const int maxp = 20;
struct Node {
  int n;
  int A[maxp];
  Node() { n = 0; };
  void add(int x) { A[n++] = x; }
  Node operator+(const Node& rhs) {
    Node tmp;
    tmp.n = min(10, rhs.n + n);
    int l = 0, r = 0, cnt = 0;
    while (cnt < tmp.n) {
      if (r >= rhs.n || (l < n && A[l] < rhs.A[r]))
        tmp.A[cnt++] = A[l++];
      else
        tmp.A[cnt++] = rhs.A[r++];
    }
    return tmp;
  }
  void print(int a) {
    printf("%d", min(n, a));
    for (int i = 0; i < min(a, n); i++) printf(" %d", A[i]);
    printf("\n");
  }
};
const int maxn = 100000 + 10;
const int maxnode = 4 * maxn;
vector<int> p[maxn];
int Hash[maxn];
struct IntervalTree {
  Node sumv[maxnode];
  void build(int o, int L, int R) {
    if (L == R) {
      int x = Hash[L];
      sort(p[x].begin(), p[x].end());
      int up = min(10, (int)p[x].size());
      for (int i = 0; i < up; i++) {
        sumv[o].add(p[x][i]);
      }
    } else {
      int lc = o * 2, rc = o * 2 + 1, M = L + (R - L) / 2;
      build(lc, L, M);
      build(rc, M + 1, R);
      sumv[o] = sumv[lc] + sumv[rc];
    }
  }
  Node query(int o, int L, int R, int ql, int qr) {
    if (ql <= L && qr >= R)
      return sumv[o];
    else {
      int lc = o * 2, rc = o * 2 + 1, M = L + (R - L) / 2;
      if (qr <= M) return query(lc, L, M, ql, qr);
      if (ql > M) return query(rc, M + 1, R, ql, qr);
      return query(lc, L, M, ql, qr) + query(rc, M + 1, R, ql, qr);
    }
  }
  int dep[maxn], siz[maxn], id[maxn], son[maxn];
  int val[maxn], top[maxn], fa[maxn], num, n;
  vector<int> G[maxn];
  void init(int n) {
    this->n = n;
    for (int i = 1; i <= n; i++) G[i].clear();
  }
  void add_edge(int u, int v) {
    G[u].push_back(v);
    G[v].push_back(u);
  }
  void build_link() {
    son[0] = num = 0;
    dfs(1, -1, 1);
    dfslink(1, 1);
    for (int i = 1; i <= n; i++) Hash[id[i]] = i;
    build(1, 1, num);
  }
  void dfs(int u, int f, int d) {
    dep[u] = d;
    siz[u] = 1;
    son[u] = 0;
    fa[u] = f;
    for (int i = 0; i < G[u].size(); i++) {
      int v = G[u][i];
      if (v == f) continue;
      dfs(v, u, d + 1);
      siz[u] += siz[v];
      if (siz[son[u]] < siz[v]) son[u] = v;
    }
  }
  void dfslink(int u, int tp) {
    top[u] = tp;
    id[u] = ++num;
    if (son[u]) dfslink(son[u], tp);
    for (int i = 0; i < G[u].size(); i++) {
      int v = G[u][i];
      if (v == fa[u] || v == son[u]) continue;
      dfslink(v, v);
    }
  }
  Node query(int u, int v) {
    int tp1 = top[u], tp2 = top[v];
    Node ans;
    while (tp1 != tp2) {
      if (dep[tp1] < dep[tp2]) {
        swap(tp1, tp2);
        swap(u, v);
      }
      ans = ans + query(1, 1, n, id[tp1], id[u]);
      u = fa[tp1];
      tp1 = top[u];
    }
    if (dep[u] > dep[v]) swap(u, v);
    ans = ans + query(1, 1, n, id[u], id[v]);
    return ans;
  }
} tree;
int main() {
  int n, m, q;
  scanf("%d%d%d", &n, &m, &q);
  tree.init(n);
  for (int i = 0, u, v; i < n - 1; i++) {
    scanf("%d%d", &u, &v);
    tree.add_edge(u, v);
  }
  for (int i = 1, x; i <= m; i++) {
    scanf("%d", &x);
    p[x].push_back(i);
  }
  tree.build_link();
  for (int i = 0, u, v, a; i < q; i++) {
    scanf("%d%d%d", &u, &v, &a);
    Node ans = tree.query(u, v);
    ans.print(a);
  }
  return 0;
}
