Problem: Recently Duff has been a soldier in the army. Malek is her commander.

Their country, Andarz Gu has n cities (numbered from 1 to n) and n - 1 bidirectional roads. Each road connects two different cities. There exist a unique path between any two cities.

There are also m people living in Andarz Gu (numbered from 1 to m). Each person has and ID number. ID number of i - th person is i and he/she lives in city number ci. Note that there may be more than one person in a city, also there may be no people living in the city.

<image>

Malek loves to order. That's why he asks Duff to answer to q queries. In each query, he gives her numbers v, u and a.

To answer a query:

Assume there are x people living in the cities lying on the path from city v to city u. Assume these people's IDs are p1, p2, ..., px in increasing order. 

If k = min(x, a), then Duff should tell Malek numbers k, p1, p2, ..., pk in this order. In the other words, Malek wants to know a minimums on that path (or less, if there are less than a people).

Duff is very busy at the moment, so she asked you to help her and answer the queries.

Input

The first line of input contains three integers, n, m and q (1 ≤ n, m, q ≤ 105).

The next n - 1 lines contain the roads. Each line contains two integers v and u, endpoints of a road (1 ≤ v, u ≤ n, v ≠ u).

Next line contains m integers c1, c2, ..., cm separated by spaces (1 ≤ ci ≤ n for each 1 ≤ i ≤ m).

Next q lines contain the queries. Each of them contains three integers, v, u and a (1 ≤ v, u ≤ n and 1 ≤ a ≤ 10).

Output

For each query, print numbers k, p1, p2, ..., pk separated by spaces in one line.

Examples

Input

5 4 5
1 3
1 2
1 4
4 5
2 1 4 3
4 5 6
1 5 2
5 5 10
2 3 3
5 3 1


Output

1 3
2 2 3
0
3 1 2 4
1 2

Note

Graph of Andarz Gu in the sample case is as follows (ID of people in each city are written next to them):

<image>

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int lcm(int a, int b) { return a * (b / gcd(a, b)); }
int n, m, q, t = 0;
set<int> s[100010];
int baseArray[100010], pa[20][100010], ptr, chainNo;
vector<int> chainInd(100010), chainHead(100010, -1), posInBase(100010);
vector<int> depth(100010), subsize(100010),
    cost(100010, 1000000000), graph[100010];
vector<int> arrival(100010), prefix(2 * 100010), euler, refer(100010, -1);
vector<pair<int, int> > answer;
struct SegmentTreeNode {
  int mini;
  void assignLeaf(int value) { mini = value; }
  void merge(SegmentTreeNode& left, SegmentTreeNode& right) {
    mini = min(left.mini, right.mini);
  }
  int getValue() { return mini; }
};
SegmentTreeNode nodes[4 * 100010];
class SegmentTree {
 public:
  void build(int num) { buildTree(1, 0, num - 1); }
  int getValue(int lo, int hi, int num) {
    SegmentTreeNode result = getValue(1, 0, num - 1, lo, hi);
    return result.getValue();
  }
  void update(int index, int value, int num) {
    update(1, 0, num - 1, index, value);
  }

 private:
  void buildTree(int stIndex, int lo, int hi) {
    if (lo == hi) {
      nodes[stIndex].assignLeaf(baseArray[lo]);
      return;
    }
    int left = 2 * stIndex, right = left + 1, mid = (lo + hi) / 2;
    buildTree(left, lo, mid);
    buildTree(right, mid + 1, hi);
    nodes[stIndex].merge(nodes[left], nodes[right]);
  }
  SegmentTreeNode getValue(int stIndex, int left, int right, int lo, int hi) {
    if (left == lo && right == hi) return nodes[stIndex];
    int mid = (left + right) / 2;
    if (lo > mid) return getValue(2 * stIndex + 1, mid + 1, right, lo, hi);
    if (hi <= mid) return getValue(2 * stIndex, left, mid, lo, hi);
    SegmentTreeNode leftResult = getValue(2 * stIndex, left, mid, lo, mid);
    SegmentTreeNode rightResult =
        getValue(2 * stIndex + 1, mid + 1, right, mid + 1, hi);
    SegmentTreeNode result;
    result.merge(leftResult, rightResult);
    return result;
  }
  void update(int stIndex, int lo, int hi, int index, int value) {
    if (lo == hi) {
      nodes[stIndex].assignLeaf(value);
      return;
    }
    int left = 2 * stIndex, right = left + 1, mid = (lo + hi) / 2;
    if (index <= mid)
      update(left, lo, mid, index, value);
    else
      update(right, mid + 1, hi, index, value);
    nodes[stIndex].merge(nodes[left], nodes[right]);
  }
};
SegmentTree st;
int query_up(int u, int v) {
  int qt;
  int uchain, vchain = chainInd[v], ans = 1000000000;
  if (u == v) ans = st.getValue(posInBase[v], posInBase[u], ptr);
  while (1) {
    uchain = chainInd[u];
    if (uchain == vchain) {
      qt = st.getValue(posInBase[v], posInBase[u], ptr);
      if (qt < ans) ans = qt;
      break;
    }
    qt = st.getValue(posInBase[chainHead[uchain]], posInBase[u], ptr);
    if (qt < ans) ans = qt;
    u = chainHead[uchain];
    u = pa[0][u];
  }
  return ans;
}
int LCA(int u, int v) {
  if (depth[u] < depth[v]) swap(u, v);
  int diff = depth[u] - depth[v];
  for (int i = 0; i < 20; i++) {
    if ((diff >> i) & 1) u = pa[i][u];
  }
  if (u == v) return u;
  for (int i = 20 - 1; i >= 0; i--) {
    if (pa[i][u] != pa[i][v]) {
      u = pa[i][u];
      v = pa[i][v];
    }
  }
  return pa[0][u];
}
int query(int u, int v) {
  int lca = LCA(u, v);
  int ans = query_up(u, lca);
  int temp = query_up(v, lca);
  if (temp < ans) ans = temp;
  return ans;
}
void change(int u, int val) { st.update(posInBase[u], val, ptr); }
void HLD(int curNode, int prev) {
  if (chainHead[chainNo] == -1) chainHead[chainNo] = curNode;
  chainInd[curNode] = chainNo;
  posInBase[curNode] = ptr;
  baseArray[ptr++] = cost[curNode];
  int sc = -1;
  for (int i = 0; i < (int)(graph[curNode].size()); i++) {
    if (graph[curNode][i] != prev) {
      if (sc == -1 || subsize[sc] < subsize[graph[curNode][i]])
        sc = graph[curNode][i];
    }
  }
  if (sc != -1) HLD(sc, curNode);
  for (int i = 0; i < graph[curNode].size(); i++) {
    if (graph[curNode][i] != prev) {
      if (sc != graph[curNode][i]) {
        chainNo++;
        HLD(graph[curNode][i], curNode);
      }
    }
  }
}
void dfs(int cur, int prev, int _depth = 0) {
  pa[0][cur] = prev;
  depth[cur] = _depth;
  subsize[cur] = 1;
  for (int i = 0; i < (int)(graph[cur].size()); i++) {
    if (graph[cur][i] != prev) {
      dfs(graph[cur][i], cur, _depth + 1);
      subsize[cur] += subsize[graph[cur][i]];
    }
  }
}
void dfs1(int cur, int prev) {
  euler.push_back((int)(s[cur].size()));
  arrival[cur] = t++;
  for (int i = 0; i < (int)(graph[cur].size()); i++) {
    if (graph[cur][i] != prev) dfs1(graph[cur][i], cur);
  }
  t++;
  euler.push_back(-(int)(s[cur].size()));
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> m >> q;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    graph[u].push_back(v);
    graph[v].push_back(u);
  }
  for (int i = 1; i < m + 1; i++) {
    int c;
    cin >> c;
    c--;
    s[c].insert(i);
    cost[c] = min(cost[c], i);
    refer[i] = c;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 20; j++) pa[j][i] = -1;
  }
  ptr = 0;
  chainNo = 0;
  dfs(0, -1);
  HLD(0, -1);
  st.build(ptr);
  for (int i = 1; i < 20; i++) {
    for (int j = 0; j < n; j++) {
      if (pa[i - 1][j] != -1) pa[i][j] = pa[i - 1][pa[i - 1][j]];
    }
  }
  dfs1(0, -1);
  prefix[0] = euler[0];
  for (int i = 1; i < (int)(euler.size()); i++)
    prefix[i] = prefix[i - 1] + euler[i];
  for (int i = 0; i < q; i++) {
    answer.clear();
    int u, v, a, k;
    cin >> u >> v >> a;
    u--;
    v--;
    int lca = LCA(u, v);
    if (lca == 0)
      k = prefix[arrival[u]] + prefix[arrival[v]] - prefix[arrival[lca]];
    else
      k = prefix[arrival[u]] + prefix[arrival[v]] - prefix[arrival[lca]] -
          prefix[arrival[pa[0][lca]]];
    a = min(a, k);
    for (int j = 1; j < a + 1; j++) {
      int result = query(u, v);
      int node = refer[result];
      answer.push_back(make_pair(result, node));
      s[node].erase(result);
      if ((int)(s[node].size()) == 0)
        change(node, 1000000000);
      else
        change(node, *(s[node].begin()));
    }
    cout << a << " ";
    for (int j = 0; j < (int)(answer.size()); j++) {
      cout << answer[j].first << " ";
      s[answer[j].second].insert(answer[j].first);
      change(answer[j].second, *(s[answer[j].second].begin()));
    }
    cout << "\n";
  }
  return 0;
}