#include <bits/stdc++.h>
using namespace std;
const auto start_time = std::chrono::high_resolution_clock::now();
void timecalculater() {}
void __print(int x) { cout << x; }
void __print(long x) { cout << x; }
void __print(long long x) { cout << x; }
void __print(unsigned x) { cout << x; }
void __print(unsigned long x) { cout << x; }
void __print(unsigned long long x) { cout << x; }
void __print(float x) { cout << x; }
void __print(double x) { cout << x; }
void __print(long double x) { cout << x; }
void __print(char x) { cout << '\'' << x << '\''; }
void __print(const char *x) { cout << '\"' << x << '\"'; }
void __print(const string &x) { cout << '\"' << x << '\"'; }
void __print(bool x) { cout << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cout << '{';
  __print(x.first);
  cout << ',';
  __print(x.second);
  cout << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cout << '{';
  for (auto &i : x) cout << (f++ ? "," : ""), __print(i);
  cout << "}";
}
void _print() { cout << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cout << ", ";
  _print(v...);
}
long long p = 998244353;
const int N = 1e5 + 5;
vector<int> g[N];
vector<int> a[N];
vector<int> anc[N][20];
int dis[N];
int x[N][20];
int n, m, q;
vector<int> merge(vector<int> a, vector<int> c, int aa) {
  vector<int> b, ans;
  b = a;
  for (auto k : c) b.push_back(k);
  sort(b.begin(), b.end());
  vector<int>::iterator ip;
  ip = std::unique(b.begin(), b.end());
  b.resize(std::distance(b.begin(), ip));
  for (int k = 0; k < min(aa, (int)(b).size()); k++) {
    ans.push_back(b[k]);
  }
  return ans;
}
void dfs(int i, int p, int d) {
  dis[i] = d;
  if (p != -1) {
    anc[i][0] = merge(a[i], a[p], 10);
  } else {
    vector<int> v;
    anc[i][0] = merge(a[i], v, 10);
  }
  x[i][0] = p;
  for (auto j : g[i]) {
    if (j == p) continue;
    dfs(j, i, d + 1);
  }
}
int LCA(int u, int v) {
  if (dis[v] > dis[u]) swap(u, v);
  int h = dis[u] - dis[v];
  int i = 0;
  while (h) {
    if (h % 2) u = x[u][i];
    i++;
    h = h / 2;
  }
  for (int k = 19; k >= 0; k--) {
    if (x[u][k] != x[v][k]) {
      u = x[u][k];
      v = x[v][k];
    }
  }
  if (u == v) return u;
  return x[u][0];
}
vector<int> calc(int u, int v, int aa) {
  int h = dis[v] - dis[u];
  vector<int> ans;
  ans = a[v];
  int i = 0;
  while (h) {
    if (h % 2) {
      ans = merge(ans, anc[v][i], aa);
      v = x[v][i];
    }
    i++;
    h = h / 2;
  }
  return ans;
}
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cin.exceptions(cin.failbit);
  int T = 1;
  while (T--) {
    cin >> n >> m >> q;
    for (long long i = 0; i < (n - 1); ++i) {
      int u, v;
      cin >> u >> v;
      g[u].push_back(v);
      g[v].push_back(u);
    }
    vector<int> e[n + 1];
    for (long long i = 0; i < (m); ++i) {
      int c;
      cin >> c;
      e[c].push_back(i + 1);
    }
    for (int i = 1; i <= (n); ++i) {
      for (int k = 0; k < min(10, (int)(e[i]).size()); k++)
        a[i].push_back(e[i][k]);
    }
    dfs(1, -1, 0);
    x[1][0] = 1;
    for (int j = 1; j <= 19; j++) {
      for (int i = 1; i <= n; i++) {
        x[i][j] = x[x[i][j - 1]][j - 1];
        anc[i][j] = merge(anc[i][j - 1], anc[x[i][j - 1]][j - 1], 10);
      }
    }
    while (q--) {
      int u, v, aa;
      cin >> u >> v >> aa;
      int lca = LCA(u, v);
      vector<int> ans;
      ans = merge(calc(lca, u, aa), calc(lca, v, aa), aa);
      cout << min(aa, (int)(ans).size()) << " ";
      for (long long i = 0; i < (min(aa, (int)(ans).size())); ++i)
        cout << ans[i] << " ";
      cout << '\n';
    }
  }
  timecalculater();
  return 0;
}
