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;
const int MAXN = 4e5 + 10;
const int INF = 0x3f3f3f3f;
int n, m, q;
vector<int> vec[MAXN];
int tree[MAXN][15];
int son[MAXN], bigson[MAXN], fa[MAXN];
int depth[MAXN];
void dfs1(int now, int pre) {
  son[now] = 1;
  int mx = 0;
  for (auto to : vec[now]) {
    if (to == pre) continue;
    depth[to] = depth[now] + 1;
    fa[to] = now;
    dfs1(to, now);
    son[now] += son[to];
    if (son[to] > mx) {
      bigson[now] = to;
      mx = son[to];
    }
  }
}
int dfn[MAXN], pos[MAXN];
int cnt;
int a[MAXN][15];
int top[MAXN];
void dfs2(int now, int tp) {
  dfn[now] = ++cnt;
  pos[cnt] = now;
  top[now] = tp;
  if (son[now] > 1) dfs2(bigson[now], tp);
  for (auto to : vec[now]) {
    if (to != fa[now] && to != bigson[now]) dfs2(to, to);
  }
}
void push_up(int rt) {
  int l1 = 0, l2 = 0;
  int now = 0;
  while (l1 < 10 && l2 < 10 && now < 10) {
    if (tree[rt << 1][l1] < tree[rt << 1 | 1][l2]) {
      tree[rt][now++] = tree[rt << 1][l1];
      l1++;
    } else {
      tree[rt][now++] = tree[rt << 1 | 1][l2];
      l2++;
    }
  }
  while (l1 < 10 && now < 10) {
    tree[rt][now++] = tree[rt << 1][l1];
    l1++;
  }
  while (l2 < 10 && now < 10) {
    tree[rt][now++] = tree[rt << 1 | 1][l2];
    l2++;
  }
  sort(tree[rt], tree[rt] + 10);
}
void build(int l, int r, int rt) {
  if (l == r) {
    for (int i = 0; i < 10; i++) tree[rt][i] = a[pos[l]][i];
    return;
  }
  int mid = (l + r) >> 1;
  build(l, mid, rt << 1);
  build(mid + 1, r, rt << 1 | 1);
  push_up(rt);
}
void query(int l, int r, int rt, int L, int R, priority_queue<int>& q) {
  if (L <= l && R >= r) {
    for (int i = 0; i < 10; i++) q.push(tree[rt][i]);
    while (q.size() > 10) q.pop();
    return;
  }
  int mid = (l + r) >> 1;
  if (L <= mid) query(l, mid, rt << 1, L, R, q);
  if (R > mid) query(mid + 1, r, rt << 1 | 1, L, R, q);
}
void query(int x, int y, priority_queue<int>& q) {
  while (top[x] != top[y]) {
    if (depth[top[x]] > depth[top[y]]) swap(x, y);
    query(1, n, 1, dfn[top[y]], dfn[y], q);
    y = fa[top[y]];
  }
  if (depth[x] > depth[y]) swap(x, y);
  query(1, n, 1, dfn[x], dfn[y], q);
}
void solve() {
  dfs1(1, 0);
  dfs2(1, 1);
  build(1, n, 1);
  int u, v, num;
  int tmp[15];
  while (q--) {
    scanf("%d%d%d", &u, &v, &num);
    priority_queue<int> q;
    query(u, v, q);
    while (!q.empty() && q.top() > m + 5) q.pop();
    int qnum = 0;
    while (!q.empty()) {
      tmp[qnum++] = q.top();
      q.pop();
    }
    printf("%d", min(num, qnum));
    for (int i = 0; i < min(num, qnum); i++) {
      printf(" %d", tmp[qnum - i - 1]);
    }
    printf("\n");
  }
}
void init() {
  memset(tree, INF, sizeof(tree));
  memset(a, INF, sizeof(a));
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1, u, v; i < n; i++) {
    scanf("%d%d", &u, &v);
    vec[u].push_back(v);
    vec[v].push_back(u);
  }
  for (int i = 1, tmp; i <= m; i++) {
    scanf("%d", &tmp);
    if (i < a[tmp][9]) {
      a[tmp][9] = i;
      sort(a[tmp], a[tmp] + 10);
    }
  }
}
int main() {
  int T = 1;
  while (T--) {
    init();
    solve();
  }
  return 0;
}