#include <bits/stdc++.h>
using namespace std;
const int MAXN = 4e5 + 10;
const int INF = 0x3f3f3f3f;
int n, m, q;
vector<int> vec[MAXN];
int tree[MAXN][15];
int son[MAXN], bigson[MAXN], fa[MAXN];
int depth[MAXN];
void dfs1(int now, int pre) {
  son[now] = 1;
  int mx = 0;
  for (auto to : vec[now]) {
    if (to == pre) continue;
    depth[to] = depth[now] + 1;
    fa[to] = now;
    dfs1(to, now);
    son[now] += son[to];
    if (son[to] > mx) {
      bigson[now] = to;
      mx = son[to];
    }
  }
}
int dfn[MAXN], pos[MAXN];
int cnt;
int a[MAXN][15];
int top[MAXN];
void dfs2(int now, int tp) {
  dfn[now] = ++cnt;
  pos[cnt] = now;
  top[now] = tp;
  if (son[now] > 1) dfs2(bigson[now], tp);
  for (auto to : vec[now]) {
    if (to != fa[now] && to != bigson[now]) dfs2(to, to);
  }
}
void push_up(int rt) {
  int l1 = 0, l2 = 0;
  int now = 0;
  while (l1 < 10 && l2 < 10 && now < 10) {
    if (tree[rt << 1][l1] < tree[rt << 1 | 1][l2]) {
      tree[rt][now++] = tree[rt << 1][l1];
      l1++;
    } else {
      tree[rt][now++] = tree[rt << 1 | 1][l2];
      l2++;
    }
  }
  while (l1 < 10 && now < 10) {
    tree[rt][now++] = tree[rt << 1][l1];
    l1++;
  }
  while (l2 < 10 && now < 10) {
    tree[rt][now++] = tree[rt << 1 | 1][l2];
    l2++;
  }
  sort(tree[rt], tree[rt] + 10);
}
void build(int l, int r, int rt) {
  if (l == r) {
    for (int i = 0; i < 10; i++) tree[rt][i] = a[pos[l]][i];
    return;
  }
  int mid = (l + r) >> 1;
  build(l, mid, rt << 1);
  build(mid + 1, r, rt << 1 | 1);
  push_up(rt);
}
void query(int l, int r, int rt, int L, int R, priority_queue<int>& q) {
  if (L <= l && R >= r) {
    for (int i = 0; i < 10; i++) q.push(tree[rt][i]);
    while (q.size() > 10) q.pop();
    return;
  }
  int mid = (l + r) >> 1;
  if (L <= mid) query(l, mid, rt << 1, L, R, q);
  if (R > mid) query(mid + 1, r, rt << 1 | 1, L, R, q);
}
void query(int x, int y, priority_queue<int>& q) {
  while (top[x] != top[y]) {
    if (depth[top[x]] > depth[top[y]]) swap(x, y);
    query(1, n, 1, dfn[top[y]], dfn[y], q);
    y = fa[top[y]];
  }
  if (depth[x] > depth[y]) swap(x, y);
  query(1, n, 1, dfn[x], dfn[y], q);
}
void solve() {
  dfs1(1, 0);
  dfs2(1, 1);
  build(1, n, 1);
  int u, v, num;
  int tmp[15];
  while (q--) {
    scanf("%d%d%d", &u, &v, &num);
    priority_queue<int> q;
    query(u, v, q);
    while (!q.empty() && q.top() > m + 5) q.pop();
    int qnum = 0;
    while (!q.empty()) {
      tmp[qnum++] = q.top();
      q.pop();
    }
    printf("%d", min(num, qnum));
    for (int i = 0; i < min(num, qnum); i++) {
      printf(" %d", tmp[qnum - i - 1]);
    }
    printf("\n");
  }
}
void init() {
  memset(tree, INF, sizeof(tree));
  memset(a, INF, sizeof(a));
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1, u, v; i < n; i++) {
    scanf("%d%d", &u, &v);
    vec[u].push_back(v);
    vec[v].push_back(u);
  }
  for (int i = 1, tmp; i <= m; i++) {
    scanf("%d", &tmp);
    if (i < a[tmp][9]) {
      a[tmp][9] = i;
      sort(a[tmp], a[tmp] + 10);
    }
  }
}
int main() {
  int T = 1;
  while (T--) {
    init();
    solve();
  }
  return 0;
}
