#include <bits/stdc++.h>
using namespace std;
long long t = 1;
const long long N = 100005, c = 10, nax = 20;
vector<long long> adj[N], people[N], v[nax][N];
long long parent[20][N], lvl[N];
void dfs(long long node, long long par) {
  if (par != -1)
    lvl[node] = lvl[par] + 1;
  else
    lvl[node] = 0;
  parent[0][node] = par;
  if (par != -1)
    for (auto x : people[par]) v[0][node].push_back(x);
  for (auto x : adj[node])
    if (x != par) dfs(x, node);
}
void preprocess(long long n) {
  for (long long j = 1; j < nax; j += 1) {
    for (long long i = 1; i < n + 1; i += 1) {
      if (parent[j - 1][i] != -1) {
        parent[j][i] = parent[j - 1][parent[j - 1][i]];
        long long cur1 = 0, cur2 = 0, sa = (long long)(v[j - 1][i].size()),
                  sb = (long long)(v[j - 1][parent[j - 1][i]].size());
        while (cur1 < sa and cur2 < sb and (long long)(v[j][i].size()) < c) {
          if (v[j - 1][i][cur1] < v[j - 1][parent[j - 1][i]][cur2])
            v[j][i].push_back(v[j - 1][i][cur1++]);
          else
            v[j][i].push_back(v[j - 1][parent[j - 1][i]][cur2++]);
        }
        while ((long long)(v[j][i].size()) < c and (cur1 < sa || cur2 < sb)) {
          if (cur1 < sa) v[j][i].push_back(v[j - 1][i][cur1++]);
          if (cur2 < sb) v[j][i].push_back(v[j - 1][parent[j - 1][i]][cur2++]);
        }
      }
    }
  }
}
void MERGE(vector<long long>& va, vector<long long>& vb) {
  vector<long long> tmp;
  for (auto d : va) tmp.push_back(d);
  va.clear();
  long long cur1 = 0, cur2 = 0, sa = (long long)(tmp.size()),
            sb = (long long)(vb.size());
  while (cur1 < sa and cur2 < sb and (long long)(va.size()) < c) {
    if (tmp[cur1] <= vb[cur2]) {
      va.push_back(tmp[cur1]);
      if (vb[cur2] == tmp[cur1]) cur2++;
      cur1++;
    } else
      va.push_back(vb[cur2++]);
  }
  while ((long long)(va.size()) < c and (cur1 < sa || cur2 < sb)) {
    if (cur1 < sa) va.push_back(tmp[cur1++]);
    if (cur2 < sb) va.push_back(vb[cur2++]);
  }
}
vector<long long> get(long long x, long long y) {
  vector<long long> vx, vy;
  if (lvl[x] < lvl[y]) swap(x, y);
  for (auto d : people[x]) vx.push_back(d);
  for (auto d : people[y]) vy.push_back(d);
  for (long long i = nax - 1; i >= 0; i--) {
    if (lvl[y] + (1 << i) <= lvl[x]) {
      MERGE(vx, v[i][x]);
      x = parent[i][x];
    }
  }
  if (x == y) return vx;
  for (long long i = nax - 1; i >= 0; i--) {
    if (parent[i][x] != -1 and parent[i][y] != -1 and
        parent[i][x] != parent[i][y]) {
      MERGE(vx, v[i][x]);
      MERGE(vy, v[i][y]);
      x = parent[i][x];
      y = parent[i][y];
    }
  }
  MERGE(vx, vy);
  MERGE(vx, v[0][x]);
  return vx;
}
void solve() {
  long long n, a, u, vv, m, q;
  cin >> n >> m >> q;
  memset(parent, -1, sizeof parent);
  for (long long i = 1; i < n; i += 1) {
    cin >> u >> vv;
    adj[u].push_back(vv);
    adj[vv].push_back(u);
  }
  for (long long i = 1; i < m + 1; i += 1) {
    cin >> u;
    if ((long long)(people[u].size()) < c) people[u].push_back(i);
  }
  dfs(1, -1);
  preprocess(n);
  vector<long long> res;
  while (q--) {
    cin >> u >> vv >> a;
    res = get(u, vv);
    cout << min((long long)(res.size()), a);
    for (long long i = 0; i < min((long long)(res.size()), a); i += 1) {
      cout << " " << res[i];
    }
    cout << endl;
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  while (t--) {
    solve();
  }
  return 0;
}
