#include <bits/stdc++.h>
using namespace std;
const int kSkipSize = 317;
struct Item {
  int prev = -1;
  int skip_prev = -1;
  vector<int> skip_persons;
  int tin = -1;
  int tout = -1;
};
int global_time = 0;
int N, M;
vector<vector<int>> gr;
vector<Item> items;
vector<vector<int>> C;
void FillPersons(Item& item, const set<int>& persons) {
  item.skip_persons.reserve(min((size_t)10, persons.size()));
  auto it = persons.begin();
  for (int i = 0; i < 10 && it != persons.end(); ++i, ++it) {
    item.skip_persons.push_back(*it);
  }
}
void Dfs(int v, int pv, vector<int>& way, set<int>& persons) {
  items[v].prev = pv;
  for (int p : C[v]) {
    persons.insert(p);
  }
  if (way.size() >= kSkipSize) {
    items[v].skip_prev = way[way.size() - kSkipSize];
    FillPersons(items[v], persons);
  }
  way.push_back(v);
  bool dropped = false;
  if (way.size() > kSkipSize) {
    dropped = true;
    int idx = way[way.size() - kSkipSize - 1];
    for (int c : C[idx]) {
      persons.erase(c);
    }
  }
  items[v].tin = global_time;
  ++global_time;
  for (int u : gr[v]) {
    if (u == pv) {
      continue;
    }
    Dfs(u, v, way, persons);
  }
  for (int p : C[v]) {
    persons.erase(p);
  }
  if (dropped) {
    int idx = way[way.size() - kSkipSize - 1];
    for (int c : C[idx]) {
      persons.insert(c);
    }
  }
  way.pop_back();
  items[v].tout = global_time;
  ++global_time;
}
template <class T>
void Merge(vector<int>& r, vector<int>& tmp, const T& container) {
  tmp.clear();
  merge(r.begin(), r.end(), container.begin(), container.end(),
        back_inserter(tmp));
  tmp.erase(unique(tmp.begin(), tmp.end()), tmp.end());
  if (tmp.size() > 10) {
    tmp.resize(10);
  }
  tmp.swap(r);
}
bool Inside(int v, int right) {
  return items[v].tin < items[right].tin && items[v].tout > items[right].tout;
}
vector<int> Get(int v, int right) {
  vector<int> result, tmp;
  while (v != -1 && v != right && !Inside(v, right)) {
    int long_prev = items[v].skip_prev;
    if (long_prev == -1 || Inside(long_prev, right)) {
      Merge(result, tmp, C[v]);
      v = items[v].prev;
    } else {
      Merge(result, tmp, items[v].skip_persons);
      v = long_prev;
    }
  }
  if (v != -1) {
    Merge(result, tmp, C[v]);
  }
  return result;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int Q;
  scanf("%d%d%d", &N, &M, &Q);
  gr.assign(N, vector<int>());
  for (int i = 0; i < N - 1; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    --u;
    --v;
    gr[u].push_back(v);
    gr[v].push_back(u);
  }
  C.assign(N, vector<int>());
  for (int i = 0; i < M; ++i) {
    int c;
    scanf("%d", &c);
    --c;
    if (C[c].size() < 10) {
      C[c].push_back(i);
    }
  }
  items.assign(N, Item());
  {
    vector<int> way;
    set<int> persons;
    Dfs(0, -1, way, persons);
  }
  vector<int> tmp;
  for (int request = 0; request < Q; ++request) {
    int v, u, a;
    scanf("%d%d%d", &v, &u, &a);
    --v;
    --u;
    auto r = Get(v, u);
    auto r2 = Get(u, v);
    Merge(r, tmp, r2);
    if (r.size() > a) {
      r.resize(a);
    }
    printf("%d", (int)r.size());
    for (int z : r) {
      printf(" %d", z + 1);
    }
    puts("");
  }
  return 0;
}
