#include <bits/stdc++.h>
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c* x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug& operator<<(const c&) {
    return *this;
  }
};
vector<int> merge(vector<int> a, vector<int> b) {
  for (auto i : b) a.push_back(i);
  sort((a).begin(), (a).end());
  a.erase(unique((a).begin(), (a).end()), a.end());
  while (a.size() > 10) a.pop_back();
  return a;
}
vector<int> in, out;
vector<vector<int> > pe;
vector<vector<int> > gr, up;
vector<vector<vector<int> > > res;
int ti = 0, lg = 0;
void dfs(int v, int p = 0) {
  in[v] = ++ti;
  up[v][0] = p;
  res[v][0] = merge(pe[v], pe[p]);
  for (int i = 1; i <= lg; ++i) {
    up[v][i] = up[up[v][i - 1]][i - 1];
    res[v][i] = merge(res[v][i - 1], res[up[v][i - 1]][i - 1]);
  }
  for (auto to : gr[v])
    if (to != p) {
      dfs(to, v);
    }
  out[v] = ++ti;
}
bool anc(int a, int b) { return (in[a] <= in[b] && out[b] <= out[a]); }
int lca(int a, int b) {
  if (anc(a, b)) return a;
  if (anc(b, a)) return b;
  for (int i = lg; ~i; --i) {
    if (!anc(up[a][i], b)) {
      a = up[a][i];
    }
  }
  return up[a][0];
}
vector<int> get(int a, int b) {
  vector<int> f;
  for (int i = lg; ~i; --i) {
    if (!anc(up[b][i], a)) {
      f = merge(f, res[b][i]);
      b = up[b][i];
    }
  }
  if (b != a) f = merge(f, res[b][0]);
  return f;
}
void solve() {
  int n, m, q;
  cin >> n >> m >> q;
  gr.resize(n);
  up.resize(n);
  res.resize(n);
  in.resize(n);
  out.resize(n);
  pe.resize(n);
  while ((1 << lg) <= n) ++lg;
  for (int i = 0; i < n; ++i) {
    up[i].resize(lg + 1);
    res[i].resize(lg + 1);
  }
  for (int i = 1; i < n; ++i) {
    int v, u;
    cin >> v >> u;
    --v;
    --u;
    gr[v].push_back(u);
    gr[u].push_back(v);
  }
  for (int i = 0; i < m; ++i) {
    int c;
    cin >> c;
    --c;
    pe[c].push_back(i);
  }
  for (int i = 0; i < n; ++i) {
    while (pe[i].size() > 10) pe[i].pop_back();
  }
  dfs(0);
  while (q--) {
    int v, u, x;
    cin >> v >> u >> x;
    --v;
    --u;
    int lc = lca(v, u);
    vector<int> a = get(lc, v), b = get(lc, u);
    a = merge(a, b);
    a = merge(a, pe[lc]);
    cout << min(x, (int)a.size()) << " ";
    for (int i = 0; i < min(x, (int)a.size()); ++i) cout << a[i] + 1 << " ";
    cout << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int q = 1;
  while (q--) solve();
}
