#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, -1, 1};
const int N = 1000010;
const int M = 18;
int n, m, q;
vector<long long> g[N];
int h[N], lca[N][M];
int new_idx = 1;
int tr[4 * N], L[4 * N], R[4 * N], root[N];
void build(int no, int l, int r) {
  tr[no] = 0;
  if (l == r) return;
  L[no] = new_idx++;
  R[no] = new_idx++;
  int mid = (l + r) >> 1;
  build(L[no], l, mid);
  build(R[no], mid + 1, r);
}
int update(int no, int l, int r, int pos) {
  int id = new_idx++;
  tr[id] = tr[no] + 1;
  if (l == r) return id;
  L[id] = L[no];
  R[id] = R[no];
  int mid = (l + r) >> 1;
  if (pos <= mid)
    L[id] = update(L[id], l, mid, pos);
  else
    R[id] = update(R[id], mid + 1, r, pos);
  return id;
}
vector<long long> P[N];
void process() {
  for (int j = 1; j < M; ++j)
    for (int i = 0; i <= n; ++i) lca[i][j] = lca[lca[i][j - 1]][j - 1];
}
int anc(int x, int y) {
  if (h[x] < h[y]) swap(x, y);
  int d = h[x] - h[y];
  for (int i = M - 1; i >= 0; --i)
    if (d & (1 << i)) x = lca[x][i];
  if (x == y) return x;
  for (int i = M - 1; i >= 0; --i)
    if (lca[x][i] != lca[y][i]) x = lca[x][i], y = lca[y][i];
  return lca[x][0];
}
void dfs(int x, int ult, int prof = 0) {
  h[x] = prof;
  lca[x][0] = ult;
  root[x] = root[ult];
  for (int i = 0; i < P[x].size(); ++i)
    root[x] = update(root[x], 0, m, P[x][i]);
  for (int i = 0; i < g[x].size(); ++i) {
    int y = g[x][i];
    if (y == ult) continue;
    dfs(y, x, prof + 1);
  }
}
int query(int noa, int nob, int nol, int nop, int l, int r, int k) {
  if (l == r) {
    int val = tr[noa] + tr[nob] - tr[nol] - tr[nop];
    if (val - k == 0)
      return l;
    else
      return -1;
  }
  int mid = (l + r) >> 1;
  int val = tr[L[noa]] + tr[L[nob]] - tr[L[nol]] - tr[L[nop]];
  if (val >= k)
    return query(L[noa], L[nob], L[nol], L[nop], l, mid, k);
  else
    return query(R[noa], R[nob], R[nol], R[nop], mid + 1, r, k - val);
}
int main() {
  scanf("%d %d %d", &n, &m, &q);
  for (int i = 0; i + 1 < n; ++i) {
    int a, b;
    scanf("%d %d", &a, &b);
    g[a].push_back(b);
    g[b].push_back(a);
  }
  for (int i = 1; i <= m; ++i) {
    int x;
    scanf("%d", &x);
    P[x].push_back(i);
  }
  root[0] = 0;
  build(0, 0, m);
  dfs(1, 0, 0);
  process();
  while (q--) {
    int a, b, c;
    scanf("%d %d %d", &a, &b, &c);
    set<int> s;
    int l = anc(a, b);
    int pl = lca[l][0];
    for (int i = 0; i < c; ++i) {
      int val = query(root[a], root[b], root[l], root[pl], 0, m, i + 1);
      if (val != -1)
        s.insert(val);
      else
        break;
    }
    int quant = min((int)s.size(), c);
    printf("%d", quant);
    set<int>::iterator it = s.begin();
    for (int i = 0; i < quant; ++i) printf(" %d", *it), it++;
    printf("\n");
  }
  return 0;
}
