#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int sz = 1e5 + 10;
int n, m, q;
int lg[sz];
int lvl[sz];
int table[sz][17];
int par[sz];
vector<int> G[sz], cnt[sz], node[sz][17];
void dfs(int fr, int u, int dep) {
  lvl[u] = dep;
  par[u] = fr;
  for (const int &v : G[u]) {
    if (fr == v) continue;
    dfs(u, v, dep + 1);
  }
}
void merge(vector<int> &a, const vector<int> &b) {
  for (const int &v : b) a.push_back(v);
  sort(a.begin(), a.end());
  a.resize(unique(a.begin(), a.end()) - a.begin());
  a.resize(min(10, (int)a.size()));
}
void init(int n) {
  memset(table, -1, sizeof table);
  for (int i = 0; i < n; i++) {
    table[i][0] = par[i];
    merge(node[i][0], cnt[i]);
    if (par[i] != -1) {
      merge(node[i][0], cnt[par[i]]);
    }
  }
  for (int j = 1; (1 << j) < n; j++) {
    for (int i = 0; i < n; i++) {
      if (table[i][j - 1] == -1) continue;
      table[i][j] = table[table[i][j - 1]][j - 1];
      merge(node[i][j], node[table[i][j - 1]][j - 1]);
      merge(node[i][j], node[i][j - 1]);
    }
  }
  for (int i = 0; (1 << i) < sz; i++) lg[1 << i] = i;
  for (int i = 1; i < sz; i++)
    if (!lg[i]) lg[i] = lg[i - 1];
}
int query(int n, int p, int q) {
  int log;
  if (lvl[p] < lvl[q]) swap(p, q);
  log = lg[lvl[p]];
  for (int i = log; i >= 0; i--) {
    if (lvl[p] - (1 << i) >= lvl[q]) {
      p = table[p][i];
    }
  }
  if (p == q) return p;
  for (int i = log; i >= 0; i--) {
    if (table[p][i] != -1 && table[p][i] != table[q][i]) {
      p = table[p][i];
      q = table[q][i];
    }
  }
  return par[p];
}
vector<int> get(int x, int k) {
  int log = lg[k];
  vector<int> ret;
  for (int i = log; i >= 0; i--) {
    if (k & (1 << i)) {
      merge(ret, node[x][i]);
      x = table[x][i];
    }
  }
  return ret;
}
int main() {
  while (scanf("%d %d %d", &n, &m, &q) == 3) {
    for (int i = 0; i <= n; i++) {
      G[i].clear();
      cnt[i].clear();
      for (int j = 0; j < 17; j++) {
        node[i][j].clear();
      }
    }
    for (int i = 1; i < n; i++) {
      int x, y;
      scanf("%d %d", &x, &y);
      --x, --y;
      G[x].push_back(y);
      G[y].push_back(x);
    }
    dfs(-1, 0, 0);
    for (int i = 1; i <= m; i++) {
      int x;
      scanf("%d", &x);
      --x;
      cnt[x].push_back(i);
    }
    for (int i = 0; i <= n; i++) {
      cnt[i].resize(min((int)cnt[i].size(), 10));
    }
    init(n);
    vector<int> ans;
    while (q--) {
      int x, y, a;
      scanf("%d %d %d", &x, &y, &a);
      --x, --y;
      ans.clear();
      merge(ans, cnt[x]);
      merge(ans, cnt[y]);
      int lca = query(n, x, y);
      int dist1 = lvl[x] - lvl[lca];
      int dist2 = lvl[y] - lvl[lca];
      merge(ans, get(x, dist1));
      merge(ans, get(y, dist2));
      ans.resize(min(a, (int)ans.size()));
      printf("%d", (int)ans.size());
      for (const int &v : ans) printf(" %d", v);
      printf("\n");
    }
  }
  return 0;
}
