#include <bits/stdc++.h>
using namespace std;
const int maxx = 1e5 + 5, inf = 1e6 + 20, lgm = 18;
int n, m, k, q, par[maxx][lgm], h[maxx];
vector<int> adj[maxx];
bool vis[maxx];
vector<int> s[maxx], sp[maxx][lgm];
void mrg(vector<int> &a, vector<int> &b, vector<int> &c) {
  vector<int> d;
  int p1 = 0, p2 = 0, t = 0;
  while (t < 10) {
    if (p1 == a.size() && p2 == b.size()) break;
    if (p1 == a.size())
      d.push_back(b[p2++]);
    else if (p2 == b.size())
      d.push_back(a[p1++]);
    else {
      if (a[p1] < b[p2])
        d.push_back(a[p1++]);
      else
        d.push_back(b[p2++]);
    }
    t++;
  }
  c.resize(10, inf);
  for (int i = 0; i < t; i++) c[i] = d[i];
  c.resize(t);
  return;
}
void mrg2(set<int> b, set<int> &c) {
  for (int x : b) c.insert(x);
  while (c.size() > 10) c.erase(*c.rbegin());
  return;
}
void dfs(int root, int dad) {
  vis[root] = true;
  par[root][0] = dad;
  sp[root][0].resize(10, inf);
  mrg(s[root], sp[root][0], sp[root][0]);
  for (int i = 1; i < lgm; i++) {
    par[root][i] = par[par[root][i - 1]][i - 1];
    mrg(sp[root][i - 1], sp[par[root][i - 1]][i - 1], sp[root][i]);
  }
  for (int x : adj[root]) {
    if (!vis[x]) h[x] = h[root] + 1, dfs(x, root);
  }
}
void chap(vector<int> &tmp, int g) {
  for (int i = 0; i < tmp.size(); i++) {
    if (tmp[i] == inf) {
      tmp.resize(i);
      break;
    }
  }
  if (g < tmp.size()) tmp.resize(g);
  cout << tmp.size() << " ";
  for (int x : tmp) {
    cout << x << " ";
  }
  cout << "\n";
}
void lca(int u, int v, int y) {
  vector<int> tmp;
  tmp.resize(10, inf);
  if (h[u] > h[v]) swap(u, v);
  int g = h[v] - h[u];
  for (int i = 0; i < lgm; i++)
    if (g & (1 << i)) mrg(tmp, sp[v][i], tmp), v = par[v][i];
  if (u == v) {
    mrg(tmp, s[u], tmp);
    chap(tmp, y);
    return;
  }
  for (int i = lgm - 1; i >= 0; i--)
    if (par[u][i] != par[v][i])
      mrg(tmp, sp[u][i], tmp), mrg(tmp, sp[v][i], tmp), u = par[u][i],
                                                        v = par[v][i];
  mrg(tmp, s[par[u][0]], tmp);
  mrg(tmp, s[u], tmp);
  mrg(tmp, s[v], tmp);
  chap(tmp, y);
  return;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> q;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    u--, v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  for (int i = 0; i < n; i++) s[i].resize(10, inf);
  for (int i = 1; i <= m; i++) {
    int r;
    cin >> r;
    r--;
    s[r].push_back(i);
    sort(s[r].begin(), s[r].end());
    s[r].resize(10, inf);
  }
  dfs(0, 0);
  for (int i = 0; i < q; i++) {
    int u, v, y;
    cin >> u >> v >> y;
    u--, v--;
    lca(u, v, y);
  }
  return 0;
}
