#include <bits/stdc++.h>
using namespace std;
const int MAX_V = 100005;
const int MAX_LOG = 32;
vector<int> res;
vector<int> g[MAX_V];
vector<int> c[MAX_V];
vector<int> f[MAX_LOG][MAX_V];
int fa[MAX_LOG][MAX_V];
int depth[MAX_V];
int root;
int n, m, q;
int u, v, a;
int ql[MAX_V], qr[MAX_V], qa[MAX_V];
void addedge(int u, int v) {
  g[u].push_back(v);
  g[v].push_back(u);
}
void merge(vector<int>& v1, vector<int>& v2) {
  for (int i = 0; i < v2.size(); i++) v1.push_back(v2[i]);
  sort(v1.begin(), v1.end());
  int len = unique(v1.begin(), v1.end()) - v1.begin();
  v1.resize(min(len, 10));
}
void dfs(int u, int p, int d) {
  fa[0][u] = p;
  depth[u] = d;
  merge(f[0][u], c[p]);
  merge(f[0][u], c[u]);
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    if (v == p) continue;
    dfs(v, u, d + 1);
  }
}
void init() {
  dfs(root, -1, 0);
  for (int k = 0; k + 1 < MAX_LOG; k++) {
    for (int v = 1; v <= n; v++) {
      fa[k + 1][v] = fa[k][fa[k][v]];
      f[k + 1][v] = f[k][v];
      merge(f[k + 1][v], f[k][fa[k][v]]);
    }
  }
}
int LCA(int u, int v) {
  if (depth[u] > depth[v]) swap(u, v);
  for (int k = MAX_LOG - 1; k >= 0; --k) {
    if ((depth[v] - depth[u]) & (1 << k)) {
      merge(res, f[k][v]);
      v = fa[k][v];
    }
  }
  if (u == v) {
    merge(res, c[u]);
    return u;
  }
  for (int k = MAX_LOG - 1; k >= 0; k--) {
    if (fa[k][u] != fa[k][v]) {
      merge(res, f[k][u]);
      merge(res, f[k][v]);
      u = fa[k][u];
      v = fa[k][v];
    }
  }
  merge(res, f[0][u]);
  merge(res, f[0][v]);
  return fa[0][u];
}
void solve() {
  for (int i = 1; i <= q; i++) {
    res.clear();
    int lca = LCA(ql[i], qr[i]);
    int len = res.size();
    printf("%d ", min(qa[i], len));
    for (int j = 0; j < min(qa[i], len); j++) {
      printf("%d ", res[j]);
    }
    printf("\n");
  }
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &u, &v);
    addedge(u, v);
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d", &u);
    c[u].push_back(i);
  }
  for (int i = 1; i <= n; i++) {
    sort(c[i].begin(), c[i].end());
    if (c[i].size() > 10) c[i].resize(10);
  }
  root = 1;
  init();
  for (int i = 1; i <= q; i++) {
    scanf("%d%d%d", &ql[i], &qr[i], &qa[i]);
  }
  solve();
  return 0;
}
