#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10, MAXL = 20;
vector<int> ans, val[MAXN][MAXL + 10], g[MAXN], p[MAXN];
int par[MAXN][MAXL + 10], h[MAXN];
vector<int> merg(vector<int> a, vector<int> b) {
  int ind1 = 0, ind2 = 0;
  vector<int> res;
  while (res.size() <= 20 and (ind1 < a.size() or ind2 < b.size()))
    if (ind1 >= a.size())
      res.push_back(b[ind2++]);
    else if (ind2 >= b.size())
      res.push_back(a[ind1++]);
    else if (a[ind1] <= b[ind2])
      res.push_back(a[ind1++]);
    else if (a[ind1] > b[ind2])
      res.push_back(b[ind2++]);
  return res;
}
void dfs(int v, int x = 0, int he = 1) {
  par[v][0] = x;
  for (int i = 1; i <= MAXL; i++) par[v][i] = par[par[v][i - 1]][i - 1];
  val[v][0] = p[x];
  for (int i = 1; i <= MAXL; i++)
    val[v][i] = merg(val[v][i - 1], val[par[v][i - 1]][i - 1]);
  h[v] = he;
  for (int i = 0; i < g[v].size(); i++) {
    int u = g[v][i];
    if (u != x) dfs(u, v, he + 1);
  }
}
int getpar(int v, int x) {
  int ppp = v;
  for (int i = 0; i <= MAXL; i++)
    if (x & (1 << i)) v = par[v][i];
  return v;
}
vector<int> getval(int v, int x) {
  int ppp = v;
  vector<int> res;
  if (x == 0) return res;
  for (int i = 0; i <= MAXL; i++)
    if (x & (1 << i)) res = merg(res, val[v][i]), v = par[v][i];
  return res;
}
int LCA(int v, int u) {
  int vp = v, up = u;
  if (h[v] > h[u]) swap(v, u);
  int e = h[u] - h[v];
  if (e != 0) u = getpar(u, e);
  if (v == u) return v;
  for (int i = MAXL; i >= 0; i--)
    if (par[v][i] != par[u][i]) {
      v = par[v][i];
      u = par[u][i];
    }
  v = par[v][0];
  u = par[u][0];
  return v;
}
void solve(int v, int u) {
  if (h[v] > h[u]) swap(v, u);
  int l = LCA(v, u), hei = h[l];
  if (l == v) {
    ans = merg(getval(u, h[u] - h[v]), p[u]);
    return;
  }
  vector<int> s1 = getval(v, h[v] - hei - 1), s2 = getval(u, h[u] - hei - 1);
  ans = merg(s1, s2);
  ans = merg(ans, p[l]);
  ans = merg(ans, p[v]);
  ans = merg(ans, p[u]);
}
int main() {
  int n, m, q;
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i < n; i++) {
    int v, u;
    scanf("%d%d", &v, &u);
    g[v].push_back(u);
    g[u].push_back(v);
  }
  for (int i = 1; i <= m; i++) {
    int x;
    scanf("%d", &x);
    p[x].push_back(i);
  }
  for (int i = 1; i <= m; i++) {
    sort(p[i].begin(), p[i].end());
    while (p[i].size() > 10) p[i].pop_back();
  }
  dfs(1);
  for (int i = 1; i <= q; i++) {
    int v, u, x;
    scanf("%d%d%d", &v, &u, &x);
    solve(v, u);
    int ind = min(x, (int)ans.size());
    printf("%d ", ind);
    for (int j = 0; j < ind; j++) printf("%d ", ans[j]);
    printf("\n");
  }
  return 0;
}
