#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100100, MAXL = 20;
int n, m, q, niv[MAXN], c[MAXN], pai[MAXN], dp[MAXN][MAXL];
vector<int> g[MAXN], ids[MAXN];
bool calc[MAXN][MAXL];
vector<int> memo[MAXN][MAXL];
void dfs(int v, int p = -1) {
  for (auto u : g[v])
    if (u != p) pai[u] = v, niv[u] = niv[v] + 1, dfs(u, v);
}
void add(int v, int id) {
  ids[v].push_back(id);
  sort(ids[v].begin(), ids[v].end());
  if (ids[v].size() > 10) ids[v].pop_back();
}
int ancestral(int v, int x) {
  if (x == 0) return pai[v];
  if (dp[v][x] != -1) return dp[v][x];
  return dp[v][x] = ancestral(ancestral(v, x - 1), x - 1);
}
vector<int> join(vector<int> a, vector<int> b) {
  vector<int> ret;
  for (auto u : a) ret.push_back(u);
  for (auto u : b) ret.push_back(u);
  sort(ret.begin(), ret.end());
  while (ret.size() > 10) ret.pop_back();
  return ret;
}
vector<int> f(int v, int x) {
  if (calc[v][x]) return memo[v][x];
  calc[v][x] = 1;
  if (x == 0) return memo[v][x] = ids[v];
  return memo[v][x] = join(f(v, x - 1), f(ancestral(v, x - 1), x - 1));
}
int lca(int a, int b) {
  if (niv[a] < niv[b]) swap(a, b);
  for (int i = MAXL - 1; i >= 0; i--)
    if (niv[a] - (1 << i) >= niv[b]) a = ancestral(a, i);
  if (a == b) return a;
  for (int i = MAXL - 1; i >= 0; i--)
    if (niv[a] - (1 << i) >= 0 && ancestral(a, i) != ancestral(b, i))
      a = ancestral(a, i), b = ancestral(b, i);
  return pai[a];
}
vector<int> resp(int a, int b) {
  int x = lca(a, b);
  vector<int> ret;
  for (int i = MAXL - 1; i >= 0; i--)
    if (niv[a] - (1 << i) >= niv[x]) {
      ret = join(ret, f(a, i)), a = ancestral(a, i);
    }
  for (int i = MAXL - 1; i >= 0; i--)
    if (niv[b] - (1 << i) >= niv[x]) {
      ret = join(ret, f(b, i)), b = ancestral(b, i);
    }
  ret = join(ret, ids[x]);
  return ret;
}
int main() {
  memset(dp, -1, sizeof dp);
  cin >> n >> m >> q;
  for (int i = 1, a, b, c; i < n; i++)
    cin >> a >> b, g[a].emplace_back(b), g[b].emplace_back(a);
  for (int i = 1; i <= m; i++) cin >> c[i], add(c[i], i);
  dfs(1);
  while (q--) {
    int u, v, a;
    cin >> u >> v >> a;
    vector<int> ans = resp(u, v);
    if (ans.size() == 0)
      cout << "0\n";
    else {
      cout << min((int)ans.size(), a) << " ";
      for (int i = 0; i <= min((int)ans.size() - 1, a - 1); i++)
        cout << ans[i] << " ";
      cout << "\n";
    }
  }
}
