#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
int n, m, q;
int sum[N * 40], ls[N * 40], rs[N * 40], root[N];
int f[N][20], dep[N];
vector<int> e[N], v, num[N];
int sze;
void build(int pre, int &now, int l, int r) {
  now = ++sze;
  ls[now] = ls[pre];
  rs[now] = rs[pre];
  sum[now] = sum[pre];
  if (l == r) return;
  int mid = (l + r) >> 1;
  build(ls[pre], ls[now], l, mid);
  build(rs[pre], rs[now], mid + 1, r);
}
void update(int pre, int &now, int l, int r, int d, int val) {
  now = ++sze;
  ls[now] = ls[pre], rs[now] = rs[pre];
  sum[now] = sum[pre] + val;
  if (l == r) return;
  int mid = (l + r) >> 1;
  if (d <= mid)
    update(ls[pre], ls[now], l, mid, d, val);
  else
    update(rs[pre], rs[now], mid + 1, r, d, val);
}
void dfs(int x, int y) {
  root[x] = root[y];
  if (num[x].size()) {
    for (int i = 0; i < num[x].size(); i++)
      update(root[x], root[x], 1, m, num[x][i], 1);
  }
  dep[x] = dep[y] + 1;
  for (int i = 0; i < e[x].size(); i++) {
    if (e[x][i] == y) continue;
    int v = e[x][i];
    f[v][0] = x;
    for (int j = 1; f[f[v][j - 1]][j - 1]; j++) f[v][j] = f[f[v][j - 1]][j - 1];
    dfs(v, x);
  }
}
int lca(int x, int y) {
  if (dep[x] < dep[y]) swap(x, y);
  int t = dep[x] - dep[y];
  for (int i = 0; i <= 16; i++)
    if ((1 << i) & t) x = f[x][i];
  for (int i = 16; i >= 0; i--)
    if (f[x][i] != f[y][i]) x = f[x][i], y = f[y][i];
  if (x == y) return x;
  return f[x][0];
}
int ask(int aa, int bb, int cc, int dd, int l, int r, int k) {
  int re = sum[ls[aa]] + sum[ls[bb]] - sum[ls[cc]] - sum[ls[dd]];
  if (l == r) {
    if (k == (sum[aa] + sum[bb] - sum[cc] - sum[dd]))
      return l;
    else
      return 0;
  }
  int mid = (l + r) >> 1;
  if (k <= re) {
    return ask(ls[aa], ls[bb], ls[cc], ls[dd], l, mid, k);
  } else
    return ask(rs[aa], rs[bb], rs[cc], rs[dd], mid + 1, r, k - re);
}
int main() {
  sze = 0;
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    e[u].push_back(v);
    e[v].push_back(u);
  }
  for (int i = 1; i <= m; i++) {
    int d;
    scanf("%d", &d);
    num[d].push_back(i);
  }
  dfs(1, 0);
  for (int i = 1; i <= q; i++) {
    int u, vv, k;
    scanf("%d%d%d", &u, &vv, &k);
    v.clear();
    int tt = lca(u, vv);
    for (int j = 1; j <= k; j++) {
      int hh = ask(root[u], root[vv], root[tt], root[f[tt][0]], 1, m, j);
      if (hh) v.push_back(hh);
    }
    printf("%d", v.size());
    for (int j = 0; j < v.size(); j++) printf(" %d", v[j]);
    printf("\n");
  }
}
