#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
struct edge {
  int v, next;
} e[maxn << 1];
inline char nc() {
  static char buf[100000], *p1 = buf, *p2 = buf;
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
inline int _read() {
  char ch = nc();
  int sum = 0;
  while (!(ch >= '0' && ch <= '9')) ch = nc();
  while (ch >= '0' && ch <= '9') sum = sum * 10 + ch - 48, ch = nc();
  return sum;
}
int head[maxn], cnt = 0, fa[maxn], dep[maxn];
int up[maxn][20];
struct data {
  int num[11];
  int cnt;
} bel[maxn][20];
void add(int u, int v) {
  e[++cnt] = (edge){v, head[u]};
  head[u] = cnt;
  e[++cnt] = (edge){u, head[v]};
  head[v] = cnt;
}
int n, m;
data merge(const data &a, const data &b) {
  data ans;
  ans.cnt = 0;
  int l = 1, r = 1;
  while (l <= a.cnt && r <= b.cnt && ans.cnt < 10) {
    if (a.num[l] < b.num[r])
      ans.num[++ans.cnt] = a.num[l++];
    else
      ans.num[++ans.cnt] = b.num[r++];
  }
  while (l <= a.cnt && ans.cnt < 10) ans.num[++ans.cnt] = a.num[l++];
  while (r <= b.cnt && ans.cnt < 10) ans.num[++ans.cnt] = b.num[r++];
  return ans;
}
void dfs(int u) {
  up[u][0] = fa[u];
  dep[u] = dep[fa[u]] + 1;
  for (int i = 1; i <= 17; i++) up[u][i] = up[up[u][i - 1]][i - 1];
  for (int i = 1; i <= 17; i++)
    bel[u][i] = merge(bel[u][i - 1], bel[up[u][i - 1]][i - 1]);
  for (int i = head[u]; ~i; i = e[i].next) {
    int v = e[i].v;
    if (v == fa[u]) continue;
    fa[v] = u;
    dfs(v);
  }
}
data Query(int u, int v) {
  data ans;
  ans.cnt = 0;
  if (dep[u] < dep[v]) swap(u, v);
  for (int i = 17; i >= 0; i--)
    if (dep[up[u][i]] >= dep[v]) ans = merge(ans, bel[u][i]), u = up[u][i];
  if (u == v) return merge(ans, bel[u][0]);
  for (int i = 17; i >= 0; i--)
    if (up[u][i] != up[v][i]) {
      ans = merge(ans, bel[u][i]);
      ans = merge(ans, bel[v][i]);
      u = up[u][i];
      v = up[v][i];
    }
  ans = merge(ans, bel[u][0]);
  ans = merge(ans, bel[v][0]);
  ans = merge(ans, bel[up[u][0]][0]);
  return ans;
}
int u, v, w;
int q, p;
int main() {
  n = _read();
  m = _read();
  q = _read();
  memset(head, -1, sizeof(head));
  for (int i = 1; i < n; i++) u = _read(), v = _read(), add(u, v);
  for (int i = 1; i <= m; i++) {
    p = _read();
    if (bel[p][0].cnt >= 10) continue;
    bel[p][0].num[++bel[p][0].cnt] = i;
  }
  dfs(1);
  while (q--) {
    u = _read();
    v = _read();
    w = _read();
    data ans = Query(u, v);
    printf("%d ", min(ans.cnt, w));
    for (int i = 1; i <= min(ans.cnt, w); i++) printf("%d ", ans.num[i]);
    printf("\n");
  }
  return 0;
}
