#include <bits/stdc++.h>
using namespace std;
const int oo = 1e9 + 7;
const int eps = 1e-9;
struct data {
  int val;
  vector<int> vec;
};
int N, M, Q;
vector<int> G[100010], lca;
int D[100010];
data P[100010][20];
vector<int> Merge(vector<int> &a, vector<int> &b) {
  vector<int> c;
  int i = 0, j = 0;
  while (i < a.size() && j < b.size()) {
    if (a[i] < b[j]) {
      c.push_back(a[i]);
      if (c.size() == 10) return c;
      ++i;
    } else {
      c.push_back(b[j]);
      if (c.size() == 10) return c;
      ++j;
    }
  }
  while (i < a.size()) {
    c.push_back(a[i]);
    if (c.size() == 10) return c;
    ++i;
  }
  while (j < b.size()) {
    c.push_back(b[j]);
    if (c.size() == 10) return c;
    ++j;
  }
  return c;
}
void DFS(int u, int pre) {
  for (int i = 0; i < G[u].size(); ++i) {
    int v = G[u][i];
    if (v == pre) continue;
    D[v] = D[u] + 1;
    P[v][0].val = u;
    DFS(v, u);
  }
}
void CalP() {
  P[0][0].val = 0;
  for (int j = 1; j <= 19; ++j) {
    for (int i = 1; i <= N; ++i) {
      P[i][j].val = P[P[i][j - 1].val][j - 1].val;
      P[i][j].vec = Merge(P[i][j - 1].vec, P[P[i][j - 1].val][j - 1].vec);
    }
  }
}
vector<int> Lca(int u, int v) {
  vector<int> res;
  bool ok = 0;
  if (D[u] > D[v]) ok = 1;
  for (int i = 19; i >= 0; --i) {
    if (D[P[u][i].val] >= D[v]) {
      res = Merge(res, P[u][i].vec);
      u = P[u][i].val;
    }
  }
  for (int i = 19; i >= 0; --i) {
    if (D[P[v][i].val] >= D[u]) {
      res = Merge(res, P[v][i].vec);
      v = P[v][i].val;
    }
  }
  if (u == v) {
    if (ok)
      res = Merge(res, P[v][0].vec);
    else
      res = Merge(res, P[u][0].vec);
    return res;
  }
  for (int i = 19; i >= 0; --i) {
    if (P[u][i].val != P[v][i].val) {
      res = Merge(res, P[u][i].vec);
      res = Merge(res, P[v][i].vec);
      u = P[u][i].val;
      v = P[v][i].val;
    }
  }
  res = Merge(res, P[u][1].vec);
  res = Merge(res, P[v][0].vec);
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> N >> M >> Q;
  for (int i = 1; i < N; ++i) {
    int u, v;
    cin >> u >> v;
    G[u].push_back(v);
    G[v].push_back(u);
  }
  for (int i = 1; i <= M; ++i) {
    int c;
    cin >> c;
    P[c][0].vec.push_back(i);
  }
  for (int i = 1; i <= N; ++i) {
    sort(P[i][0].vec.begin(), P[i][0].vec.end());
  }
  G[1].push_back(0);
  G[0].push_back(1);
  DFS(0, 0);
  CalP();
  while (Q--) {
    int u, v, a;
    cin >> u >> v >> a;
    lca = Lca(u, v);
    int lz = lca.size();
    cout << min(a, lz) << ' ';
    for (int i = 0; i < min(a, lz); ++i) {
      cout << lca[i] << ' ';
    }
    cout << '\n';
  }
}
