#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T bigmod(T p, T e, T M) {
  long long ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
template <class T>
inline T lcm(T a, T b) {
  a = abs(a);
  b = abs(b);
  return (a / gcd(a, b)) * b;
}
template <class T, class X>
inline bool getbit(T a, X i) {
  T t = 1;
  return ((a & (t << i)) > 0);
}
template <class T, class X>
inline T setbit(T a, X i) {
  T t = 1;
  return (a | (t << i));
}
template <class T, class X>
inline T resetbit(T a, X i) {
  T t = 1;
  return (a & (~(t << i)));
}
inline long long getnum() {
  char c = getchar();
  long long num, sign = 1;
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') sign = -1;
  for (num = 0; c >= '0' && c <= '9';) {
    c -= '0';
    num = num * 10 + c;
    c = getchar();
  }
  return num * sign;
}
inline long long power(long long a, long long b) {
  long long multiply = 1;
  for (int i = (0); i < (b); i++) {
    multiply *= a;
  }
  return multiply;
}
int n, m, q, u, v, c;
vector<int> graph[100002];
int table[100002][19], L[100002], st[100002], en[100002], Time = 1;
vector<int> store[100002][19], val[100002];
int query(int p, int q) {
  if (L[p] < L[q]) swap(p, q);
  int x = 1;
  while (true) {
    if ((1 << (x + 1)) > L[p]) break;
    x++;
  }
  for (int i = (x); i >= 0; i--) {
    if (L[p] - (1 << i) >= L[q]) p = table[p][i];
  }
  if (p == q) return p;
  for (int i = (x); i >= 0; i--) {
    if (table[p][i] != -1 && table[p][i] != table[q][i]) {
      p = table[p][i];
      q = table[q][i];
    }
  }
  return table[p][0];
}
void dfs(int u, int p, int d) {
  L[u] = d;
  table[u][0] = p;
  st[u] = Time++;
  if (p != -1) {
    for (auto it : val[p]) {
      store[u][0].push_back(it);
    }
  }
  for (auto v : graph[u]) {
    if (v == p) continue;
    dfs(v, u, d + 1);
  }
  en[u] = Time++;
}
void go(vector<int> &x, vector<int> &y) {
  for (auto it : y) x.push_back(it);
  sort(x.begin(), x.end());
  while (x.size() > 10) x.pop_back();
}
void build() {
  memset(table, -1, sizeof(table));
  dfs(1, -1, 0);
  for (int j = 1; 1 << j < n; j++) {
    for (int i = 1; i <= n; i++) {
      if (table[i][j - 1] != -1) {
        table[i][j] = table[table[i][j - 1]][j - 1];
        go(store[i][j], store[i][j - 1]);
        go(store[i][j], store[table[i][j - 1]][j - 1]);
      }
    }
  }
}
vector<int> find(int x, int y, bool t) {
  vector<int> ret;
  if (x == y) return ret;
  for (int i = 18; i >= 0; i--) {
    int up = table[x][i];
    if (up == -1) continue;
    if (t && up == y) continue;
    if (st[y] <= st[up] && en[y] >= en[up]) {
      go(ret, store[x][i]);
      x = table[x][i];
    }
    if (up == y) break;
  }
  return ret;
}
void printSolution(vector<int> &mset, int sz) {
  int cnt = 0;
  printf("%d ", min((int)mset.size(), sz));
  for (auto it : mset) {
    printf("%d ", it);
    cnt++;
    if (cnt == min((int)mset.size(), sz)) break;
  }
  puts("");
}
void printset(string s, multiset<int> &mset) {
  cout << s << ": ";
  for (auto it : mset) cout << it << " ";
  cout << "\n";
}
int main() {
  int test, cases = 1;
  scanf("%d%d%d", &n, &m, &q);
  for (int i = (0); i < (n - 1); i++) {
    scanf("%d%d", &u, &v);
    graph[u].push_back(v);
    graph[v].push_back(u);
  }
  for (int i = (1); i < (m + 1); i++) {
    scanf("%d", &c);
    val[c].push_back(i);
  }
  for (int i = (1); i < (n + 1); i++) {
    if (val[i].size()) {
      sort(val[i].begin(), val[i].end());
      while (val[i].size() > 10) val[i].pop_back();
    }
  }
  build();
  int a;
  while (q--) {
    scanf("%d%d%d", &u, &v, &a);
    int l = query(u, v);
    if (L[u] > L[v]) swap(u, v);
    if (l == u) {
      vector<int> out = find(v, u, false);
      go(out, val[v]);
      printSolution(out, a);
    } else {
      vector<int> out1 = find(u, l, false);
      vector<int> out2 = find(v, l, true);
      go(out1, out2);
      go(out1, val[u]);
      go(out1, val[v]);
      printSolution(out1, a);
    }
  }
  return 0;
}
