#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T>
T gcd(T a, T b) {
  a = abs(a), b = abs(b);
  while (b > 0) {
    tie(a, b) = make_pair(b, a % b);
  }
  return a;
}
constexpr long long INF = 1LL << 60;
constexpr int inf = 1000000007;
constexpr long long mod = 1000000007LL;
constexpr int MAX = 5000000;
struct LCA {
  static const int BITLEN_MAX = 20;
  vector<int> parent[BITLEN_MAX];
  vector<int> depth;
  int bitlen;
  LCA() {}
  LCA(int N, vector<vector<int>> edges, int root) {
    initialize(N, edges, root);
  }
  void initialize(int N, vector<vector<int>>& edges, int root) {
    bitlen = 1;
    while ((1 << bitlen) < N) bitlen += 1;
    for (int i = 0; i < bitlen; i++) parent[i].resize(N);
    depth.resize(N, -1);
    dfs(root, -1, 0, edges);
    for (int k = 0; k < bitlen - 1; k++) {
      for (int v = 0; v < N; v++) {
        if (depth[v] == -1) continue;
        if (parent[k][v] < 0) {
          parent[k + 1][v] = -1;
        } else {
          parent[k + 1][v] = parent[k][parent[k][v]];
        }
      }
    }
  }
  void dfs(int v, int p, int d, vector<vector<int>>& edges) {
    parent[0][v] = p;
    depth[v] = d;
    for (auto u : edges[v]) {
      if (u != p) dfs(u, v, d + 1, edges);
    }
  }
  int calc_lca(int u, int v) {
    if (depth[u] > depth[v]) swap(u, v);
    for (int k = 0; k < bitlen; k++) {
      if (((depth[v] - depth[u]) >> k) & 1) v = parent[k][v];
    }
    if (u == v) return u;
    for (int k = bitlen - 1; k >= 0; k--) {
      if (parent[k][u] != parent[k][v]) {
        u = parent[k][u];
        v = parent[k][v];
      }
    }
    return parent[0][u];
  }
  int calc_dist(int u, int v) {
    int l = calc_lca(u, v);
    return depth[u] + depth[v] - depth[l] * 2;
  }
};
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int n, m, kkt;
  cin >> n >> m >> kkt;
  vector<vector<int>> g(n);
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    g[u].emplace_back(v);
    g[v].emplace_back(u);
  }
  LCA lca(n, g, 0);
  vector<vector<int>> data(n);
  for (int i = 0; i < n; i++) data[i].reserve(11);
  for (int i = 0; i < m; i++) {
    int c;
    cin >> c;
    c--;
    if (data[c].size() < 10) data[c].emplace_back(i);
  }
  vector<vector<vector<int>>> db(lca.bitlen, vector<vector<int>>(n));
  for (int i = 0; i < n; i++) {
    if (lca.parent[0][i] < 0) continue;
    db[0][i] = data[lca.parent[0][i]];
  }
  for (int k = 0; k < lca.bitlen - 1; k++) {
    for (int v = 0; v < n; v++) {
      if (lca.depth[v] == -1) continue;
      if (lca.parent[k][v] >= 0) {
        int t = lca.parent[k][v];
        db[k + 1][v].resize(db[k][v].size() + db[k][t].size());
        merge(db[k][v].begin(), db[k][v].end(), db[k][t].begin(),
              db[k][t].end(), db[k + 1][v].begin());
        while (db[k + 1][v].size() > 10) db[k + 1][v].pop_back();
      }
    }
  }
  int bitlen = lca.bitlen;
  vector<int> depth = lca.depth;
  auto parent = lca.parent;
  while (kkt--) {
    int u, v, a;
    cin >> u >> v >> a;
    u--;
    v--;
    vector<int> res;
    if (depth[u] > depth[v]) swap(u, v);
    res = data[v];
    for (int k = 0; k < bitlen; k++) {
      if (((depth[v] - depth[u]) >> k) & 1) {
        vector<int> nxt(res.size() + db[k][v].size());
        merge(res.begin(), res.end(), db[k][v].begin(), db[k][v].end(),
              nxt.begin());
        while (nxt.size() > 10) nxt.pop_back();
        res = move(nxt);
        v = parent[k][v];
      }
    }
    if (u == v) {
      int sz = min(a, (int)res.size());
      res.resize(sz);
      cout << sz;
      for (int i = 0; i < sz; i++) cout << " " << res[i] + 1;
      cout << "\n";
      continue;
    }
    {
      vector<int> nxt(res.size() + data[u].size());
      merge(res.begin(), res.end(), data[u].begin(), data[u].end(),
            nxt.begin());
      while (nxt.size() > 10) nxt.pop_back();
      res = move(nxt);
    }
    for (int k = bitlen - 1; k >= 0; k--) {
      if (parent[k][u] != parent[k][v]) {
        {
          vector<int> nxt(res.size() + db[k][v].size());
          merge(res.begin(), res.end(), db[k][v].begin(), db[k][v].end(),
                nxt.begin());
          while (nxt.size() > 10) nxt.pop_back();
          res = move(nxt);
        }
        {
          vector<int> nxt(res.size() + db[k][u].size());
          merge(res.begin(), res.end(), db[k][u].begin(), db[k][u].end(),
                nxt.begin());
          while (nxt.size() > 10) nxt.pop_back();
          res = move(nxt);
        }
        u = parent[k][u];
        v = parent[k][v];
      }
    }
    {
      vector<int> nxt(res.size() + db[0][u].size());
      merge(res.begin(), res.end(), db[0][u].begin(), db[0][u].end(),
            nxt.begin());
      while (nxt.size() > 10) nxt.pop_back();
      res = move(nxt);
    }
    int sz = min(a, (int)res.size());
    res.resize(sz);
    cout << sz;
    for (int i = 0; i < sz; i++) cout << " " << res[i] + 1;
    cout << "\n";
  }
  return 0;
}
