#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1, -1, -1, 1, 1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
template <class T>
inline T biton(T n, T pos) {
  return n | ((T)1 << pos);
}
template <class T>
inline T bitoff(T n, T pos) {
  return n & ~((T)1 << pos);
}
template <class T>
inline T ison(T n, T pos) {
  return (bool)(n & ((T)1 << pos));
}
template <class T>
inline T gcd(T a, T b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
template <typename T>
string NumberToString(T Number) {
  ostringstream second;
  second << Number;
  return second.str();
}
inline int nxt() {
  int aaa;
  scanf("%d", &aaa);
  return aaa;
}
inline long long int lxt() {
  long long int aaa;
  scanf("%lld", &aaa);
  return aaa;
}
inline long double dxt() {
  long double aaa;
  scanf("%lf", &aaa);
  return aaa;
}
template <class T>
inline T bigmod(T p, T e, T m) {
  T ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % m;
    p = (p * p) % m;
  }
  return (T)ret;
}
vector<int> adj[200010];
int table[32][200010];
vector<int> man[32][200010];
int depth[200010];
int parent[200010];
void dfs(int s, int p, int d) {
  parent[s] = p;
  depth[s] = d;
  for (int i = 0; i < adj[s].size(); i++) {
    int t = adj[s][i];
    if (t == p) continue;
    dfs(t, s, d + 1);
  }
}
vector<int> Merge(vector<int> a, vector<int> b) {
  vector<int> c;
  c.resize(a.size() + b.size());
  merge(a.begin(), a.end(), b.begin(), b.end(), c.begin());
  if (c.size() > 10) c.resize(10);
  return c;
}
void lca_init(int n) {
  memset(table, -1, sizeof(table));
  for (int i = 0; i < n; i++) {
    table[0][i] = parent[i];
  }
  for (int i = 1; (1 << i) < n; i++) {
    for (int j = 0; j < n; j++) {
      if (table[i - 1][j] != -1) {
        man[i][j] = Merge(man[i - 1][j], man[i - 1][table[i - 1][j]]);
        table[i][j] = table[i - 1][table[i - 1][j]];
      }
    }
  }
}
vector<int> lca_query(int p, int q) {
  if (depth[q] > depth[p]) swap(p, q);
  int log = 1;
  vector<int> ans;
  while ((1 << log) < depth[p]) log++;
  for (int i = log; i >= 0; i--) {
    if (depth[p] - (1 << i) >= depth[q]) {
      ans = Merge(ans, man[i][p]);
      p = table[i][p];
    }
  }
  if (p == q) {
    ans = Merge(ans, man[0][p]);
    return ans;
  }
  for (int i = log; i >= 0; i--) {
    if (table[i][p] != -1 && table[i][p] != table[i][q]) {
      ans = Merge(ans, man[i][p]);
      ans = Merge(ans, man[i][q]);
      p = table[i][p], q = table[i][q];
    }
  }
  ans = Merge(ans, man[0][p]);
  ans = Merge(ans, man[0][q]);
  p = parent[p];
  ans = Merge(ans, man[0][p]);
  return ans;
}
int main() {
  int n = nxt();
  int m = nxt();
  int q = nxt();
  for (int i = 0; i < n - 1; i++) {
    int a = nxt();
    int b = nxt();
    a--;
    b--;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  for (int i = 1; i <= m; i++) {
    int a = nxt();
    a--;
    man[0][a].push_back(i);
  }
  for (int i = 0; i < n; i++) {
    sort(man[0][i].begin(), man[0][i].end());
    if (man[0][i].size() > 10) man[0][i].resize(10);
  }
  dfs(0, -1, 1);
  lca_init(n);
  while (q--) {
    int u = nxt();
    int v = nxt();
    u--;
    v--;
    int a = nxt();
    vector<int> res;
    res = lca_query(u, v);
    if (res.size() > a) res.resize(a);
    printf("%d", (int)res.size());
    for (int i = 0; i < res.size(); i++) {
      printf(" %d", res[i]);
    }
    printf("\n");
  }
  return 0;
}
