#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)1e5 + 10;
const int pot = 20;
const int inf = (int)1e9 + 696969;
vector<int> v[maxn], p[maxn];
int deep[maxn];
int f[pot][maxn];
vector<int> best[pot][maxn];
void wczytaj(int *n, int *m, int *q) {
  scanf("%d %d %d", n, m, q);
  for (int i = 1; i < *n; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    v[a].push_back(b);
    v[b].push_back(a);
  }
  for (int i = 1; i <= *m; i++) {
    int a;
    scanf("%d", &a);
    p[a].push_back(i);
  }
  for (int i = 1; i <= *n; i++) sort(p[i].begin(), p[i].end());
}
vector<int> small(vector<int> x, vector<int> y) {
  vector<int> ret;
  int xi = 0, yi = 0;
  while (ret.size() < 10) {
    if (xi >= x.size() && yi >= y.size()) break;
    int one = (xi >= x.size()) ? inf : x[xi];
    int two = (yi >= y.size()) ? inf : y[yi];
    if (one < two) {
      ret.push_back(one);
      ++xi;
    } else {
      ret.push_back(two);
      ++yi;
    }
  }
  return ret;
}
void dfs(int a, int fat) {
  deep[a] = deep[fat] + 1;
  f[0][a] = fat;
  for (int i = 1; i < pot; i++) f[i][a] = f[i - 1][f[i - 1][a]];
  best[0][a] = p[a];
  for (int i = 1; i < pot; i++) {
    if (f[i - 1][a] == 0) {
      best[i][a] = best[i - 1][a];
      continue;
    }
    best[i][a] = small(best[i - 1][a], best[i - 1][f[i - 1][a]]);
  }
  for (auto it : v[a])
    if (it != fat) dfs(it, a);
}
void ans(int a, int b, int war) {
  vector<int> ret;
  if (deep[a] > deep[b]) swap(a, b);
  for (int i = pot - 1; i >= 0; i--)
    if (deep[f[i][b]] >= deep[a]) {
      ret = small(ret, best[i][b]);
      b = f[i][b];
    }
  if (b == a) {
    ret = small(ret, best[0][a]);
    printf("%d ", min((int)ret.size(), war));
    for (int i = 0; i < min((int)ret.size(), war); i++) printf("%d ", ret[i]);
    printf("\n");
    return;
  }
  for (int i = pot - 1; i >= 0; i--) {
    if (f[i][a] != f[i][b]) {
      ret = small(ret, best[i][a]);
      ret = small(ret, best[i][b]);
      a = f[i][a];
      b = f[i][b];
    }
  }
  ret = small(ret, best[1][a]);
  ret = small(ret, best[0][b]);
  printf("%d ", min((int)ret.size(), war));
  for (int i = 0; i < min((int)ret.size(), war); i++) printf("%d ", ret[i]);
  printf("\n");
}
int main() {
  int n, m, q;
  wczytaj(&n, &m, &q);
  deep[1] = 1;
  dfs(1, 0);
  while (q--) {
    int v, u, a;
    scanf("%d %d %d", &v, &u, &a);
    ans(v, u, a);
  }
}
