#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0;
  char ch = getchar();
  bool positive = 1;
  for (; ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') positive = 0;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
  return positive ? x : -x;
}
inline char RC() {
  char c = getchar();
  while (c == ' ' || c == '\n') c = getchar();
  return c;
}
inline long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
inline long long lcm(long long a, long long b, long long MOD) {
  return a / gcd(a, b) * b % MOD;
}
inline long long Sub(long long x, long long y, long long mod) {
  long long res = x - y;
  while (res < 0) res += mod;
  return res;
}
inline long long Add(long long x, long long y, long long mod) {
  long long res = x + y;
  while (res >= mod) res -= mod;
  return res;
}
inline long long POW_MOD(long long x, long long y, long long mod) {
  long long ret = 1;
  while (y > 0) {
    if (y & 1) ret = ret * x % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return ret;
}
const int N = 200015;
const int inf = 2100000000;
const long long INF = 1LL << 62;
const double PI = 3.14159265358;
struct Node {
  int ls, rs, w;
  Node() : ls(0), rs(0), w(0) {}
} T[N * 20];
int root[N], a[N], b[N], p[N], sz;
int n, m, q;
int top[N];
int idx[N];
int siz[N];
int son[N];
int dep[N];
int father[N];
vector<int> e[N], peo[N];
void build(int &i, int l, int r, int x) {
  T[++sz] = T[i];
  i = sz;
  T[i].w++;
  if (l == r) return;
  int mid = (l + r) >> 1;
  if (x <= mid)
    build(T[i].ls, l, mid, x);
  else
    build(T[i].rs, mid + 1, r, x);
}
void dfs(int u, int fa) {
  for (int i = 0; i < e[u].size(); ++i) {
    int v = e[u][i];
    if (v == fa) continue;
    root[v] = root[u];
    for (int j = 0; j < peo[v].size(); ++j) {
      build(root[v], 1, m, peo[v][j]);
    }
    dfs(v, u);
  }
}
void dfs(int u, int fa, int d) {
  dep[u] = d;
  father[u] = fa;
  son[u] = 0;
  siz[u] = 1;
  for (int i = 0; i < e[u].size(); i++) {
    int v = e[u][i];
    if (v == fa) continue;
    dfs(v, u, d + 1);
    siz[u] += siz[v];
    if (siz[son[u]] < siz[v]) son[u] = v;
  }
}
void dfs_2(int u, int tp) {
  top[u] = tp;
  if (son[u]) dfs_2(son[u], tp);
  for (int i = 0; i < e[u].size(); i++) {
    int v = e[u][i];
    if (v == father[u] || v == son[u]) continue;
    dfs_2(v, v);
  }
}
void LCA_init() {
  dfs(1, 0, 1);
  dfs_2(1, 1);
}
int LCA(int u, int v) {
  int p = top[u];
  int q = top[v];
  while (p != q) {
    if (dep[p] < dep[q]) {
      swap(p, q);
      swap(u, v);
    }
    u = father[p];
    p = top[u];
  }
  if (dep[u] > dep[v]) swap(u, v);
  return u;
}
int query(int i, int j, int p, int q, int l, int r, int k) {
  if (l == r) return l;
  int t = T[T[i].ls].w + T[T[j].ls].w - T[T[p].ls].w - T[T[q].ls].w;
  int mid = (l + r) >> 1;
  if (k <= t)
    return query(T[i].ls, T[j].ls, T[p].ls, T[q].ls, l, mid, k);
  else
    return query(T[i].rs, T[j].rs, T[p].rs, T[q].rs, mid + 1, r, k - t);
}
int main() {
  cin >> n >> m >> q;
  for (int i = 0; i < n - 1; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    e[u].push_back(v);
    e[v].push_back(u);
  }
  for (int i = 0; i < m; ++i) {
    int id;
    scanf("%d", &id);
    peo[id].push_back(i + 1);
  }
  sz = 0;
  root[1] = root[0];
  for (int i = 0; i < peo[1].size(); ++i) {
    build(root[1], 1, m, peo[1][i]);
  }
  dfs(1, -1);
  LCA_init();
  for (int i = 0; i < q; ++i) {
    int u, v, k;
    scanf("%d%d%d", &u, &v, &k);
    int t = LCA(u, v);
    vector<int> ans;
    int x = T[root[u]].w + T[root[v]].w - T[root[t]].w - T[root[father[t]]].w;
    for (int j = 1; j <= k; ++j) {
      if (x < j) break;
      int tmp = query(root[u], root[v], root[t], root[father[t]], 1, m, j);
      ans.push_back(tmp);
    }
    printf("%d ", (int)ans.size());
    if (ans.size()) {
      for (int i = 0; i < ans.size(); ++i) {
        if (i != 0) printf(" ");
        printf("%d", ans[i]);
      }
    }
    puts("");
  }
  return 0;
}
