#include <bits/stdc++.h>
using namespace std;
using vint = vector<int>;
using vvint = vector<vint>;
using vvvint = vector<vvint>;
const int nl = 18;
const int nm = 10;
vint depth;
vvint adj_list;
vvint node_min;
vvvint log_min;
vvint log_parent;
vint vmerge(const vint& left, const vint& right) {
  int left_pos = 0, right_pos = 0;
  int right_size = right.size();
  int left_size = left.size();
  int n = min(nm, left_size + right_size);
  vector<int> ans(n);
  for (int i = 0; i < n; ++i) {
    int v0 = (left_pos < left_size) ? left[left_pos] : (1 << 30);
    int v1 = (right_pos < right_size) ? right[right_pos] : (1 << 30);
    if (v0 < v1) {
      ans[i] = v0;
      ++left_pos;
    } else {
      ans[i] = v1;
      ++right_pos;
    }
  }
  return ans;
}
void dfs(int node, vint& visited, int d) {
  visited[node] = 1;
  depth[node] = d;
  for (int i = 0; i < nl - 1; ++i) {
    int lp = log_parent[node][i];
    if (lp != -1) {
      log_parent[node][i + 1] = log_parent[lp][i];
      log_min[node][i + 1] = vmerge(log_min[node][i], log_min[lp][i]);
    }
  }
  for (int i : adj_list[node]) {
    if (!visited[i]) {
      log_parent[i][0] = node;
      log_min[i][0] = node_min[i];
      dfs(i, visited, d + 1);
    }
  }
}
int find_lca(int u, int v) {
  if (u == v) return u;
  if (depth[u] != depth[v]) {
    if (depth[v] > depth[u]) swap(u, v);
    int d = depth[u] - depth[v];
    for (int i = nl - 1; i >= 0; --i)
      if (1 << i <= d) {
        u = log_parent[u][i];
        d -= (1 << i);
      }
    if (u == v) return u;
  }
  for (int i = nl - 1; i >= 0; --i)
    if (log_parent[u][i] != log_parent[v][i]) {
      u = log_parent[u][i];
      v = log_parent[v][i];
    }
  assert(log_parent[u][0] == log_parent[v][0]);
  return log_parent[u][0];
}
vint solve(int u, int v) {
  vector<int> ans;
  int lca = find_lca(u, v);
  int du = depth[u] - depth[lca];
  int dv = depth[v] - depth[lca];
  for (int i = nl - 1; i >= 0; --i) {
    if (du & (1 << i)) {
      ans = vmerge(ans, log_min[u][i]);
      u = log_parent[u][i];
    }
    if (dv & (1 << i)) {
      ans = vmerge(ans, log_min[v][i]);
      v = log_parent[v][i];
    }
  }
  ans = vmerge(ans, node_min[lca]);
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cout.precision(10);
  cout << fixed;
  int n, m, q;
  scanf("%d %d %d", &n, &m, &q);
  depth.assign(n, -1);
  adj_list.assign(n, vint());
  node_min.assign(n, vint());
  log_min.assign(n, vvint(nl, vint()));
  log_parent.assign(n, vint(nl, -1));
  for (int i = 0; i < n - 1; ++i) {
    int u, v;
    scanf("%d %d", &u, &v);
    --u;
    --v;
    adj_list[u].push_back(v);
    adj_list[v].push_back(u);
  }
  for (int i = 0; i < m; ++i) {
    int c;
    scanf("%d", &c);
    --c;
    node_min[c].push_back(i + 1);
  }
  for (int i = 0; i < n; ++i) {
    vint& c = node_min[i];
    sort(c.begin(), c.end());
    int c_size = c.size();
    if (c_size > nm) c.resize(nm);
  }
  vint visited(n, 0);
  int root = rand() % n;
  dfs(root, visited, 0);
  while (q--) {
    int u, v, a;
    scanf("%d %d %d", &u, &v, &a);
    --u;
    --v;
    vint ans = solve(u, v);
    int ans_size = ans.size();
    if (ans_size > a) ans.resize(a);
    printf("%d ", (int)ans.size());
    for (int i : ans) printf("%d ", i);
    printf("\n");
  }
  return 0;
}
