#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f, MOD = 1e9 + 7;
const int n_ = 1e5 + 1000;
long long gcd(long long a, long long b) { return (a ? gcd(b % a, a) : b); }
long long power(long long a, long long n) {
  long long p = 1;
  while (n > 0) {
    if (n % 2) {
      p = p * a;
    }
    n >>= 1;
    a *= a;
  }
  return p;
}
long long power(long long a, long long n, long long mod) {
  long long p = 1;
  while (n > 0) {
    if (n % 2) {
      p = p * a;
      p %= mod;
    }
    n >>= 1;
    a *= a;
    a %= mod;
  }
  return p % mod;
}
int n, m, q, par[n_][30], h[n_];
vector<int> x[n_][30], e[n_];
vector<int> merge(vector<int> a, vector<int> b) {
  vector<int> ret;
  for (auto el : a) ret.push_back(el);
  for (auto el : b) ret.push_back(el);
  sort((ret).begin(), (ret).end());
  while ((int)(ret).size() > 10) {
    ret.pop_back();
  }
  return ret;
}
void dfs(int u, int p = -1) {
  par[u][0] = p;
  h[u] = ~p ? h[p] + 1 : 0;
  if (~p) {
    for (int j = 1; (1 << j) <= n; j++) {
      par[u][j] = par[par[u][j - 1]][j - 1];
    }
  }
  for (int j = 1; (1 << j) <= n; j++) {
    x[u][j] = merge(x[u][j - 1], x[par[u][j - 1]][j - 1]);
  }
  for (auto v : e[u]) {
    if (v == p) continue;
    dfs(v, u);
  }
}
int climb(int u, int dh) {
  for (int j = 20; j >= 0; j--) {
    if (dh >> j & 1) u = par[u][j];
  }
  return u;
}
int lca(int u, int v) {
  if (h[u] < h[v]) swap(u, v);
  u = climb(u, h[u] - h[v]);
  if (u == v) return u;
  for (int j = 20; j >= 0; j--) {
    if (par[u][j] != par[v][j]) {
      u = par[u][j];
      v = par[v][j];
    }
  }
  return par[u][0];
}
vector<int> climb_v(int u, int dh) {
  vector<int> ret;
  for (int j = 20; j >= 0; j--) {
    if (dh >> j & 1) ret = merge(ret, x[u][j]), u = par[u][j];
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  scanf("%d %d %d", &n, &m, &q);
  for (int(i) = 0; (i) < (n - 1); (i)++) {
    int u, v;
    scanf("%d %d", &u, &v);
    u--;
    v--;
    e[u].push_back(v);
    e[v].push_back(u);
  }
  for (int(i) = 0; (i) < (m); (i)++) {
    int c;
    scanf("%d", &c);
    x[--c][0].push_back(i);
  }
  for (int(i) = 0; (i) < (n); (i)++) {
    sort((x[i][0]).begin(), (x[i][0]).end());
    while ((int)(x[i][0]).size() > 10) {
      x[i][0].pop_back();
    }
  }
  dfs(0);
  while (q--) {
    int u, v, a;
    scanf("%d %d %d", &u, &v, &a);
    u--;
    v--;
    if (h[u] > h[v]) swap(u, v);
    int w = lca(u, v);
    vector<int> x = climb_v(u, h[u] - h[w]), y = climb_v(v, h[v] - h[w] + 1);
    x = merge(x, y);
    printf("%d", min(a, (int)(x).size()));
    for (int(i) = 0; (i) < (min(a, (int)(x).size())); (i)++) {
      printf(" %d", x[i] + 1);
    }
    puts("");
  }
  return 0;
}
