#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
using int64 = long long;
const int N = 1e5 + 10;
const int M = 17;
const int K = 10;
vector<int> dp[N][M];
int f[N][M], dep[N];
vector<int> a[N];
void DFS(int u, int up, int depth) {
  dep[u] = depth;
  f[u][0] = up;
  for (auto& v : a[u]) {
    if (v == up) continue;
    DFS(v, u, depth + 1);
  }
}
void insert_element(vector<int>& A, int x, int bound) {
  A.push_back(x);
  push_heap(begin(A), end(A));
  while (A.size() > bound) {
    pop_heap(begin(A), end(A));
    A.pop_back();
  }
}
int LCA(int x, int y) {
  if (dep[x] < dep[y]) swap(x, y);
  int delta = dep[x] - dep[y];
  for (int k = M - 1; k >= 0; --k) {
    if (delta & (1 << k)) {
      x = f[x][k];
    }
  }
  for (int k = M - 1; k >= 0; --k) {
    if (f[x][k] != f[y][k]) {
      x = f[x][k];
      y = f[y][k];
    }
  }
  return x == y ? x : f[x][0];
}
void insert_set(vector<int>& A, const vector<int>& B, int bound) {
  for (auto& it : B) {
    insert_element(A, it, bound);
  }
}
void lookup(int x, int z, vector<int>& ret, int bound) {
  int delta = dep[x] - dep[z];
  for (int k = M - 1; k >= 0; --k) {
    if (delta & (1 << k)) {
      insert_set(ret, dp[x][k], bound);
      x = f[x][k];
    }
  }
}
int main() {
  int n, m, q;
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 0; i < n; ++i) {
    for (int k = 0; k < M; ++k) {
      dp[i][k].reserve(K);
    }
  }
  for (int i = 1; i < n; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    --x;
    --y;
    a[x].push_back(y);
    a[y].push_back(x);
  }
  DFS(0, -1, 0);
  for (int i = 0; i < m; ++i) {
    int x;
    scanf("%d", &x);
    --x;
    insert_element(dp[x][0], i + 1, K);
  }
  for (int k = 1; k < M; ++k) {
    for (int i = 0; i < n; ++i) {
      f[i][k] = (f[i][k - 1] == -1 ? -1 : f[f[i][k - 1]][k - 1]);
      if (f[i][k] != -1) {
        dp[i][k] = dp[i][k - 1];
        insert_set(dp[i][k], dp[f[i][k - 1]][k - 1], K);
      }
    }
  }
  while (q--) {
    int x, y, z, w;
    scanf("%d%d%d", &x, &y, &w);
    --x;
    --y;
    z = LCA(x, y);
    vector<int> ret;
    for (auto& it : dp[z][0]) {
      insert_element(ret, it, w);
    }
    lookup(x, z, ret, w);
    lookup(y, z, ret, w);
    printf("%d", ret.size());
    sort(begin(ret), end(ret));
    for (auto& it : ret) {
      printf(" %d", it);
    }
    puts("");
  }
  return 0;
}
