3 5
2 1 608591421 720962564
3 2 608591421 641991574
3 2 718110706 353409763
2 3 482786015 858341723
3 2 825397574 357507279
 2 1
2 1 317425595 636156322
 50000 1
20845 28516 904146168 997637433

Yes
641991574 1
2 
 Yes
0 0

 Yes
0 0


#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
const double pi = acos(-1.0);
const double eps = 1e-9;
vector<int> res[200100][21], cres, g;
int up[200100][21], n, m, x, y, u, v, Q, r;
int tin[200100], tout[200100];
int timer;
vector<int> a[200100], first[200100], fe[200100];
set<int>::iterator it;
void cm() {
  if ((int)cres.size() > 10) {
    sort(cres.begin(), cres.end());
    cres.pop_back();
  }
}
void check(int v, int x) {
  if ((int)res[v][x].size() > 10) {
    sort(res[v][x].begin(), res[v][x].end());
    res[v][x].pop_back();
  }
}
void merges(vector<int> &p, vector<int> w1, vector<int> w2) {
  p.clear();
  int l = 0, r = 0;
  for (int i = 0; i < 100; i++) {
    if (l == w1.size() && r == w2.size()) break;
    if (p.size() > 10) break;
    int cur = -1;
    if (p.size() > 0) cur = p.back();
    if (l < w1.size() && cur == w1[l]) {
      l++;
      continue;
    }
    if (r < w2.size() && cur == w2[r]) {
      r++;
      continue;
    }
    if (l == w1.size()) {
      p.push_back(w2[r]);
      r++;
      continue;
    }
    if (r == w2.size()) {
      p.push_back(w1[l]);
      l++;
      continue;
    }
    if (w1[l] < w2[r]) {
      p.push_back(w1[l]);
      l++;
      continue;
    }
    p.push_back(w2[r]);
    r++;
  }
}
void dfs(int v, int p) {
  tin[v] = ++timer;
  up[v][0] = p;
  for (int i = 0; i < first[v].size(); i++) {
    res[v][0].push_back(first[v][i]);
    check(v, 0);
  }
  if (p != -1) {
    for (int i = 0; i < first[p].size(); i++) {
      res[v][0].push_back(first[p][i]);
      check(v, 0);
    }
  }
  sort(res[v][0].begin(), res[v][0].end());
  for (int i = 0; i < a[v].size(); i++) {
    int to = a[v][i];
    if (to == p) continue;
    dfs(to, v);
  }
  tout[v] = ++timer;
}
bool upper(int u, int v) {
  if (tin[u] <= tin[v] && tout[u] >= tout[v]) return 1;
  return 0;
}
int getlca(int u, int v) {
  if (upper(u, v)) return u;
  if (upper(v, u)) return v;
  for (int i = 17; i >= 0; i--)
    if (up[u][i] != -1 && !upper(up[u][i], v)) u = up[u][i];
  return up[u][0];
}
int main() {
  scanf("%d%d%d", &n, &m, &Q);
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    a[x].push_back(y);
    a[y].push_back(x);
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d", &x);
    first[x].push_back(i);
  }
  for (int i = 1; i <= n; i++) {
    sort(first[i].begin(), first[i].end());
    for (int j = 0; j < min(10, (int)first[i].size()); j++)
      fe[i].push_back(first[i][j]);
  }
  for (int i = 0; i <= 17; i++)
    for (int v = 1; v <= n; v++) up[v][i] = -1;
  dfs(1, -1);
  for (int i = 1; i <= 17; i++)
    for (int v = 1; v <= n; v++)
      if (up[v][i - 1] != -1) {
        up[v][i] = up[up[v][i - 1]][i - 1];
        merges(res[v][i], res[v][i - 1], res[up[v][i - 1]][i - 1]);
      }
  for (int we = 1; we <= Q; we++) {
    scanf("%d%d%d", &u, &v, &r);
    int lc = getlca(u, v);
    cres.clear();
    for (int i = 17; i >= 0; i--)
      if (up[u][i] != -1 && !upper(up[u][i], lc)) {
        merges(cres, cres, res[u][i]);
      }
    for (int i = 17; i >= 0; i--)
      if (up[v][i] != -1 && !upper(up[v][i], lc)) {
        merges(cres, cres, res[v][i]);
      }
    merges(cres, cres, fe[v]);
    merges(cres, cres, fe[u]);
    merges(cres, cres, fe[lc]);
    printf("%d ", min((int)cres.size(), r));
    for (int i = 0; i < min((int)cres.size(), r); i++) printf("%d ", cres[i]);
    printf("\n");
  }
  return 0;
}
