#include <bits/stdc++.h>
#pragma warning(disable : 4996)
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const int maxn = 1e5 + 5;
int size[maxn], d, be[maxn], dep[maxn], val[maxn], en[maxn], son[maxn],
    top[maxn], pa[maxn], total, m;
vector<int> v[maxn], to[maxn];
void dfs1(int u, int fa, int dd) {
  size[u] = 1;
  dep[u] = dd;
  pa[u] = fa;
  top[u] = u;
  int index = 0;
  for (int i = 0; i < to[u].size(); i++) {
    if (to[u][i] != fa) {
      dfs1(to[u][i], u, dd + 1);
      size[u] += size[to[u][i]];
      if (size[to[u][i]] > size[index]) index = to[u][i];
    }
  }
  son[u] = index;
}
void dfs2(int u, int fa) {
  be[u] = d;
  for (int i = 0; i < v[u].size(); i++) val[d++] = v[u][i];
  en[u] = d - 1;
  if (son[u]) {
    top[son[u]] = top[u];
    dfs2(son[u], u);
  }
  for (int i = 0; i < to[u].size(); i++)
    if (to[u][i] != fa && to[u][i] != son[u]) dfs2(to[u][i], u);
}
struct node {
  node() {
    tot = 0;
    for (int i = 0; i < 11; i++) _min[i] = 1e9;
  }
  int _min[11], tot;
} seg[maxn * 4];
node merge(node l, node r) {
  node res;
  int lin = 0, rin = 0;
  while (res.tot < 10 && (lin < l.tot || rin < r.tot)) {
    if (l._min[lin] < r._min[rin])
      res._min[res.tot++] = l._min[lin++];
    else
      res._min[res.tot++] = r._min[rin++];
  }
  return res;
}
void build(int l, int r, int n) {
  if (l != r) {
    int mid = l + r >> 1, lson = n << 1, rson = lson + 1;
    build(l, mid, lson);
    build(mid + 1, r, rson);
    seg[n] = merge(seg[lson], seg[rson]);
  } else
    seg[n]._min[seg[n].tot++] = val[l];
}
node query(int n, int ll, int rr, int l, int r) {
  if (ll == l && rr == r) return seg[n];
  int mid = ll + rr >> 1;
  if (mid >= r)
    return query(n << 1, ll, mid, l, r);
  else if (mid < l)
    return query((n << 1) + 1, mid + 1, rr, l, r);
  else
    return merge(query(n << 1, ll, mid, l, mid),
                 query((n << 1) + 1, mid + 1, rr, mid + 1, r));
}
node find(int a, int b) {
  int f1 = top[a], f2 = top[b];
  node res;
  while (f1 != f2) {
    if (dep[f1] < dep[f2]) {
      swap(f1, f2);
      swap(a, b);
    }
    if (be[f1] && be[f1] <= en[a])
      res = merge(res, query(1, 1, m, be[f1], en[a]));
    a = pa[f1];
    f1 = top[a];
  }
  if (dep[a] > dep[b]) swap(a, b);
  if (be[a] && be[a] <= en[b]) res = merge(res, query(1, 1, m, be[a], en[b]));
  return res;
}
int main() {
  int q;
  scanf("%d%d%d", &total, &m, &q);
  for (int i = 1; i < total; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    to[a].push_back(b);
    to[b].push_back(a);
  }
  for (int i = 1; i <= m; i++) {
    int a;
    scanf("%d", &a);
    v[a].push_back(i);
  }
  d = 1;
  dfs1(1, 0, 1);
  dfs2(1, 0);
  build(1, m, 1);
  while (q--) {
    int a, b, limit;
    scanf("%d%d%d", &a, &b, &limit);
    node ans = find(a, b);
    int k = min(ans.tot, limit);
    printf("%d ", k);
    for (int i = 0; i < k; i++) printf("%d ", ans._min[i]);
    printf("\n");
  }
  return 0;
}
