#include <bits/stdc++.h>
using namespace std;
int jmp[111111][20];
int fun[111111][20][10];
int h[111111], ans[10], tmp[10];
int n, m, q;
vector<int> a[111111], val[111111];
void dfs(int v, int pr = -1, int hgt = 0) {
  jmp[v][0] = pr;
  h[v] = hgt;
  for (int i = 0; i < (int)(a[v]).size(); ++i) {
    if (a[v][i] != pr) {
      dfs(a[v][i], v, hgt + 1);
    }
  }
}
inline void merge(int a[10], int b[10], int c[10]) {
  int p1 = 0, p2 = 0;
  while (p1 + p2 < 10) {
    if (a[p1] < b[p2]) {
      tmp[p1 + p2] = a[p1];
      ++p1;
    } else {
      tmp[p1 + p2] = b[p2];
      ++p2;
    }
  }
  for (int i = 0; i < 10; ++i) c[i] = tmp[i];
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 0; i < n - 1; ++i) {
    int first, second;
    scanf("%d%d", &first, &second);
    --first;
    --second;
    a[first].push_back(second);
    a[second].push_back(first);
  }
  for (int i = 0; i < m; ++i) {
    int first;
    scanf("%d", &first);
    --first;
    val[first].push_back(i + 1);
  }
  for (int i = 0; i < n; ++i) {
    sort((val[i]).begin(), (val[i]).end());
    for (int j = 0; j < 10; ++j) {
      fun[i][0][j] = 1e9;
    }
    for (int j = 0; j < min(10, (int)(val[i]).size()); ++j) {
      fun[i][0][j] = val[i][j];
    }
  }
  dfs(0);
  for (int lev = 1; lev < 20; ++lev) {
    for (int i = 0; i < n; ++i) {
      int prev = jmp[i][lev - 1];
      if (prev != -1) {
        jmp[i][lev] = jmp[prev][lev - 1];
        merge(fun[i][lev - 1], fun[prev][lev - 1], fun[i][lev]);
      } else {
        jmp[i][lev] = -1;
        merge(fun[i][lev - 1], fun[i][lev - 1], fun[i][lev]);
      }
    }
  }
  while (q--) {
    int p, q, mx;
    scanf("%d%d%d", &p, &q, &mx);
    --p;
    --q;
    if (h[p] < h[q]) swap(p, q);
    int cp = p, cq = q, df = h[p] - h[q];
    for (int i = 0; i < 20; ++i) {
      if (df & (1 << i)) {
        cp = jmp[cp][i];
      }
    }
    int comm = 0;
    for (int i = 19; i >= 0; --i) {
      if (jmp[cp][i] != jmp[cq][i]) {
        comm += (1 << i);
        cp = jmp[cp][i];
        cq = jmp[cq][i];
      }
    }
    if (cp != cq) ++comm;
    for (int i = 0; i < 10; ++i) ans[i] = 1e9;
    cp = p;
    cq = q;
    for (int i = 0; i < 19; ++i) {
      if ((df + comm) & (1 << i)) {
        merge(ans, fun[cp][i], ans);
        cp = jmp[cp][i];
      }
      if ((comm + 1) & (1 << i)) {
        merge(ans, fun[cq][i], ans);
        cq = jmp[cq][i];
      }
    }
    int t = 0;
    while (t < mx && ans[t] < 1e9) ++t;
    printf("%d", t);
    for (int i = 0; i < t; ++i) {
      printf(" %d", ans[i]);
    }
    printf("\n");
  }
}
