#include <bits/stdc++.h>
using namespace std;
inline void rd(int &res) {
  res = 0;
  char c;
  while (c = getchar(), c < '0')
    ;
  do {
    res = (res << 1) + (res << 3) + (c ^ 48);
  } while (c = getchar(), c >= '0');
}
inline void print(int k) {
  if (k == 0) return;
  print(k / 10);
  putchar((k % 10) ^ 48);
}
inline void sc(int k) {
  print(k);
  if (k == 0) {
    putchar('0');
    putchar('\n');
  }
}
inline void MIN(int &a, int b) {
  if (a == -1 || a > b) a = b;
}
inline void MAX(int &a, int b) {
  if (a < b) a = b;
}
const int M = 1e5 + 2, S = 20;
int fa[S][M], head[M], dep[M];
int ecnt, n, m, q;
vector<int> s[S][M], ans;
struct Edge {
  int t, nxt;
} e[M << 1];
inline vector<int> msort(vector<int> A, vector<int> B) {
  vector<int> C;
  C.clear();
  int a = 0, b = 0;
  while (a < A.size() && b < B.size() && C.size() < 10) {
    if (A[a] < B[b])
      C.push_back(A[a++]);
    else
      C.push_back(B[b++]);
  }
  while (a < A.size() && C.size() < 10) C.push_back(A[a++]);
  while (b < B.size() && C.size() < 10) C.push_back(B[b++]);
  return C;
}
inline void addedge(int a, int b) {
  e[++ecnt] = (Edge){b, head[a]};
  head[a] = ecnt;
}
inline void prinf(vector<int> A) {
  for (int i = 0; i < A.size(); i++) printf("%d ", A[i]);
  puts("");
}
inline void input() {
  int i, j, k, a, b;
  vector<int> A;
  rd(n);
  rd(m);
  rd(q);
  for (i = 1; i <= n - 1; i++) {
    rd(a);
    rd(b);
    addedge(a, b);
    addedge(b, a);
  }
  for (i = 1; i <= m; i++) {
    rd(a);
    A.clear(), A.push_back(i);
    s[0][a] = msort(s[0][a], A);
  }
}
inline void dfs(int x, int f, int d) {
  dep[x] = d;
  fa[0][x] = f;
  for (int i = head[x]; i; i = e[i].nxt) {
    int t = e[i].t;
    if (t != f) dfs(t, x, d + 1);
  }
}
inline void init() {
  int i, j, k;
  for (j = 1; j <= S - 1; j++)
    for (i = 1; i <= n; i++) {
      fa[j][i] = fa[j - 1][fa[j - 1][i]];
      s[j][i] = msort(s[j - 1][i], s[j - 1][fa[j - 1][i]]);
    }
}
inline void samedep(int &x, int d) {
  int a = 0;
  while (d) {
    if (d & 1) x = fa[a][x];
    a++;
    d >>= 1;
  }
}
inline int LCA(int x, int y) {
  if (dep[x] < dep[y]) swap(x, y);
  samedep(x, dep[x] - dep[y]);
  if (x == y) return x;
  for (int i = S - 1; i >= 0; i--)
    if (fa[i][x] != fa[i][y]) x = fa[i][x], y = fa[i][y];
  return fa[0][x];
}
inline vector<int> Up(int x, int d) {
  int a = 0;
  vector<int> C;
  C.clear();
  while (d) {
    if (d & 1) C = msort(C, s[a][x]), x = fa[a][x];
    d >>= 1;
    a++;
  }
  return C;
}
inline void solve() {
  int i, j, k, a, b, t, lca;
  while (q--) {
    rd(a);
    rd(b);
    rd(t);
    lca = LCA(a, b);
    ans.clear();
    ans = msort(Up(a, dep[a] - dep[lca]), Up(b, dep[b] - dep[lca]));
    ans = msort(ans, s[0][lca]);
    if (t > ans.size()) t = ans.size();
    printf("%d ", t);
    for (i = 0; i <= t - 1; i++) printf("%d ", ans[i]);
    puts("");
  }
}
int main() {
  input();
  dfs(1, 0, 0);
  init();
  solve();
  return 0;
}
