#include <bits/stdc++.h>
using namespace std;
vector<int> graph[100005];
int parent[20][100005];
int level[100005];
int log2_[100005];
vector<int> cit[100005];
int smallest[100005][20][11];
const int INF = 1e9;
void reset(int *a) {
  for (int i = 0; i < 11; i++) a[i] = INF;
}
void copyf(int *a, int *b) {
  for (int i = 0; i < 11; i++) b[i] = a[i];
}
void merge(int *a, int *b, int *c) {
  reset(c);
  int k = 0, i = 0, j = 0;
  while (i < 11 && j < 11 && k < 11) {
    if (a[i] <= b[j]) {
      if (k > 0 && a[i] == c[k - 1]) {
        i++;
        continue;
      }
      c[k++] = a[i++];
    } else {
      if (k > 0 && b[j] == c[k - 1]) {
        j++;
        continue;
      }
      c[k++] = b[j++];
    }
  }
  while (k < 11 && i < 11) {
    if (k > 0 && a[i] == c[k - 1]) {
      i++;
      continue;
    }
    c[k++] = a[i++];
  }
  while (k < 11 && j < 11) {
    if (k > 0 && b[j] == c[k - 1]) {
      j++;
      continue;
    }
    c[k++] = b[j++];
  }
}
void DFS(int node, bool visited[]) {
  reset(smallest[node][0]);
  for (int i = 0; i < min(10, (int)cit[parent[0][node]].size()); i++)
    smallest[node][0][i] = cit[parent[0][node]][i];
  for (int i = 1; i < 20; i++)
    merge(smallest[node][i - 1], smallest[parent[i - 1][node]][i - 1],
          smallest[node][i]);
  visited[node] = true;
  for (int i = 0; i < graph[node].size(); ++i) {
    int v = graph[node][i];
    if (!visited[v]) {
      parent[0][v] = node;
      for (int j = 1; j < 20; ++j)
        parent[j][v] = parent[j - 1][parent[j - 1][v]];
      level[v] = level[node] + 1;
      DFS(v, visited);
    }
  }
  return;
}
int LCA(int x, int y) {
  if (level[x] > level[y]) swap(x, y);
  int diff = level[y] - level[x];
  while (diff) {
    int p = (diff & -diff);
    y = parent[(int)log2_[p]][y];
    diff -= p;
  }
  if (x == y) return x;
  for (int i = 19; i >= 0; --i) {
    if (parent[i][x] != parent[i][y]) {
      x = parent[i][x], y = parent[i][y];
    }
  }
  return parent[0][x];
}
void solve(int x, int y, int a) {
  int ans[11];
  int temp[11];
  int a1[11], a2[11];
  reset(a1);
  reset(a2);
  for (int i = 0; i < min(11, (int)cit[x].size()); i++) a1[i] = cit[x][i];
  for (int i = 0; i < min(11, (int)cit[y].size()); i++) a2[i] = cit[y][i];
  sort(a1, a1 + 11);
  sort(a2, a2 + 11);
  reset(ans);
  merge(ans, a1, temp);
  copyf(temp, ans);
  merge(ans, a2, temp);
  copyf(temp, ans);
  if (level[x] > level[y]) swap(x, y);
  int diff = level[y] - level[x];
  while (diff) {
    int p = (diff & -diff);
    int up = (int)log2_[p];
    merge(ans, smallest[y][up], temp);
    copyf(temp, ans);
    y = parent[up][y];
    diff -= p;
  }
  for (int i = 18; i >= 0; --i) {
    if (parent[i][x] != parent[i][y]) {
      merge(ans, smallest[x][i], temp);
      copyf(temp, ans);
      merge(ans, smallest[y][i], temp);
      copyf(temp, ans);
      x = parent[i][x], y = parent[i][y];
    }
  }
  if (x != y) merge(ans, smallest[x][0], temp);
  copyf(temp, ans);
  vector<int> ansv;
  for (int i = 0; i < a; i++) {
    if (ans[i] != INF)
      ansv.push_back(ans[i]);
    else
      break;
  }
  printf("%d ", (int)ansv.size());
  for (int i = 0; i < ansv.size(); i++) printf("%d ", ansv[i]);
  printf("\n");
}
void initialize_LCA() {
  bool vis[100005];
  for (int i = 1; i < 100005; i++)
    if (__builtin_popcount(i) == 1) log2_[i] = __builtin_popcount(i - 1);
  memset(vis, 0, sizeof(vis));
  for (int i = 0; i < 20; ++i) parent[i][0] = 0;
  level[0] = 0;
  DFS(0, vis);
}
int main() {
  int N, M, Q;
  cin >> N >> M >> Q;
  for (int i = 0; i < N - 1; ++i) {
    int u, v;
    scanf("%d %d", &u, &v);
    --u, --v;
    graph[u].push_back(v), graph[v].push_back(u);
  }
  for (int i = 0; i < M; i++) {
    int xyz;
    scanf("%d", &xyz);
    cit[xyz - 1].push_back(i + 1);
  }
  initialize_LCA();
  int u, v, a;
  while (Q--) {
    scanf("%d%d%d", &v, &u, &a);
    u--, v--;
    solve(v, u, a);
  }
  return 0;
}
