#include <bits/stdc++.h>
using namespace std;
struct node {
  int prnt, cnt;
  int ary[12];
};
vector<int> v[100005], city_id[100005];
set<int> res;
node sparse_table[30][100005];
int parent[100005], level[100005];
int n;
void DFS(int s) {
  for (int i = 0; i < v[s].size(); i++) {
    if (parent[v[s][i]] == -1 && parent[s] != v[s][i]) {
      level[v[s][i]] = level[s] + 1;
      parent[v[s][i]] = s;
      DFS(v[s][i]);
    }
  }
  return;
}
void merge_id(int i, int j) {
  int x = sparse_table[j - 1][i].prnt;
  res.clear();
  if (x != -1) {
    int k = 0, v1, v2;
    sparse_table[j][i].prnt = sparse_table[j - 1][x].prnt;
    sparse_table[j][i].cnt = 0;
    int l = sparse_table[j - 1][i].cnt;
    int r = sparse_table[j - 1][x].cnt;
    for (int p = 0, q = 0; (p < l | q < r);) {
      if ((int)res.size() >= 10) break;
      if (p >= l) {
        v1 = sparse_table[j - 1][x].ary[q];
        res.insert(v1);
        q++;
      } else if (q >= r) {
        v1 = sparse_table[j - 1][i].ary[p];
        res.insert(v1);
        p++;
      } else {
        v1 = sparse_table[j - 1][i].ary[p];
        v2 = sparse_table[j - 1][x].ary[q];
        if (v1 < v2) {
          res.insert(v1);
          p++;
        } else {
          res.insert(v2);
          q++;
        }
      }
    }
  }
  set<int>::iterator it;
  it = res.begin();
  while (it != res.end()) {
    if (sparse_table[j][i].cnt >= 10) break;
    int k = sparse_table[j][i].cnt;
    sparse_table[j][i].ary[k] = (*it);
    sparse_table[j][i].cnt++;
    it++;
  }
  return;
}
void init() {
  int x;
  for (int i = 1; i <= n; i++) {
    x = parent[i];
    res.clear();
    if (i == 1) {
      sparse_table[0][i].cnt = 0;
      for (int k = 0; k < (int)city_id[i].size(); k++) {
        if ((int)res.size() >= 10) break;
        res.insert(city_id[i][k]);
      }
    }
    if (x != -1) {
      sparse_table[0][i].prnt = parent[i];
      sparse_table[0][i].cnt = 0;
      int l = (int)city_id[i].size();
      int r = (int)city_id[x].size();
      for (int p = 0, q = 0; (p < l | q < r);) {
        if ((int)res.size() >= 10)
          break;
        else if (p >= l) {
          res.insert(city_id[x][q]);
          q++;
        } else if (q >= r) {
          res.insert(city_id[i][p]);
          p++;
        } else if (city_id[i][p] < city_id[x][q]) {
          res.insert(city_id[i][p]);
          p++;
        } else {
          res.insert(city_id[x][q]);
          q++;
        }
      }
    }
    set<int>::iterator it;
    it = res.begin();
    while (it != res.end()) {
      int k = sparse_table[0][i].cnt;
      if (k >= 10) break;
      sparse_table[0][i].ary[k] = (*it);
      sparse_table[0][i].cnt++;
      it++;
    }
  }
  for (int j = 1; (1 << j) <= n; j++) {
    for (int i = 1; i <= n; i++) {
      merge_id(i, j);
    }
  }
  return;
}
int find_lca(int x, int y) {
  if (level[x] > level[y]) swap(x, y);
  int lg = 0, t1, t2;
  while (1) {
    if ((1 << lg) > level[y]) break;
    lg++;
  }
  lg--;
  for (int i = lg; i >= 0; i--) {
    if ((level[y] - (1 << i)) >= level[x]) {
      y = sparse_table[i][y].prnt;
    }
  }
  if (x == y) return x;
  for (int i = lg; i >= 0; i--) {
    t1 = sparse_table[i][x].prnt;
    t2 = sparse_table[i][y].prnt;
    if (t1 != -1 && t1 != t2) {
      x = t1;
      y = t2;
    }
  }
  return parent[x];
}
void get_id(int x, int k) {
  if (!k) {
    for (int i = 0; i < (int)city_id[x].size(); i++) {
      if (i >= 10) break;
      res.insert(city_id[x][i]);
    }
    return;
  }
  int lg = 0;
  while (1) {
    if ((1 << lg) > k) break;
    lg++;
  }
  lg--;
  for (int i = lg; i >= 0; i--) {
    if (sparse_table[i][x].prnt != -1 && (k - (1 << i)) > 0) {
      for (int j = 0; j < sparse_table[i][x].cnt; j++) {
        res.insert(sparse_table[i][x].ary[j]);
      }
      x = sparse_table[i][x].prnt;
      k -= (1 << i);
    }
  }
  for (int i = 0; i < sparse_table[0][x].cnt; i++) {
    res.insert(sparse_table[0][x].ary[i]);
  }
  return;
}
void solve(int x, int y, int k) {
  int lca = find_lca(x, y);
  res.clear();
  if (lca == x) {
    int l = level[y] - level[lca];
    get_id(y, l);
  } else if (lca == y) {
    int l = level[x] - level[lca];
    get_id(x, l);
  } else {
    int l = level[x] - level[lca];
    get_id(x, l);
    l = level[y] - level[lca];
    get_id(y, l);
  }
  printf("%d", min((int)res.size(), k));
  set<int>::iterator it;
  it = res.begin();
  while (it != res.end() && k) {
    printf(" %d", (*it));
    it++;
    k--;
  }
  puts("");
  return;
}
int main() {
  int i, x, y, m, q, k;
  scanf("%d %d %d", &n, &m, &q);
  for (i = 1; i < n; i++) {
    scanf("%d %d", &x, &y);
    v[x].push_back(y);
    v[y].push_back(x);
  }
  for (i = 1; i <= m; i++) {
    scanf("%d", &x);
    city_id[x].push_back(i);
  }
  for (i = 1; i <= n; i++) sort(city_id[i].begin(), city_id[i].end());
  memset(parent, -1, sizeof(parent));
  memset(sparse_table, -1, sizeof(sparse_table));
  DFS(1);
  init();
  while (q--) {
    scanf("%d %d %d", &x, &y, &k);
    solve(x, y, k);
  }
  return 0;
}
