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 JAVA):

Solution:
import java.util.*;
import java.io.*;
import static java.lang.System.in;

public class Main {
    static int n,m,q,maxA = 10,maxj;
    static int[][] father;
    static ArrayList<Integer>[][] minOnPath;
    static ArrayList<Integer>[] minID,graph;
    static int[] depth;
    public static void main(String[] args)throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        //Scanner sc = new Scanner(System.in);
        String[] buf = reader.readLine().split(" ");
        n = Integer.parseInt(buf[0]); m = Integer.parseInt(buf[1]); q = Integer.parseInt(buf[2]);
        maxj = getMaxj(n);
        father = new int[n+1][maxj+1];
        minOnPath = new ArrayList[n+1][maxj+1];
        minID = new ArrayList[n+1]; graph = new ArrayList[n+1];
        depth = new int[n+1];
        for(int i=0;i<=n;i++){
            minID[i] = new ArrayList<>(); graph[i] = new ArrayList<>();
            for(int j=0;j<=maxj;j++) minOnPath[i][j] = new ArrayList<>();
        }
        for(int i=0;i<n-1;i++){
            buf = reader.readLine().split(" ");
            int u = Integer.parseInt(buf[0]), v = Integer.parseInt(buf[1]);
            graph[u].add(v); graph[v].add(u);
        }
        buf = reader.readLine().split(" ");
        for(int i=1;i<=m;i++){
            int cur = Integer.parseInt(buf[i-1]);
            minID[cur].add(i);
        }
        for(int i=1;i<=n;i++){
            Collections.sort(minID[i]);
            while(minID[i].size()>maxA) minID[i].remove(minID[i].size()-1);
        }
        iniLCA();
        iniMinOnPath();
        PrintWriter out = new PrintWriter(System.out);
        for(int i=0;i<q;i++){
            buf = reader.readLine().split(" ");
            int u = Integer.parseInt(buf[0]), v = Integer.parseInt(buf[1]);
            int a = Integer.parseInt(buf[2]);
            ArrayList<Integer> cur = query(u,v,a);
            out.print(Integer.toString(cur.size())+" ");
            for(int w:cur){
                out.print(Integer.toString(w)+" ");
            }
            out.println();
        }
        out.flush();
    }
    static ArrayList<Integer> query(int u, int v, int a){
        int root = getLCA(u,v);
        ArrayList<Integer> ans = new ArrayList<>();
        ans.addAll(getMinAlongPath(u,root));
        ans.addAll(getMinAlongPath(v,root));
        ans.addAll(minID[root]);
        Collections.sort(ans);
        while(ans.size()>a) ans.remove(ans.size()-1);
        return ans;
    }
    static ArrayList<Integer> getMinAlongPath(int lo, int hi){
        ArrayList<Integer> ans = new ArrayList<>();
        if(hi==lo) return ans;
        int dist = depth[lo]-depth[hi];
        for(int j=maxj;j>=0;j--){
            if((dist&(1<<j))==0) continue;
            ans.addAll(minOnPath[lo][j]);
            lo = father[lo][j];
            if(ans.size()>maxA){
                Collections.sort(ans);
                while(ans.size()>maxA) ans.remove(ans.size()-1);
            }
        }
        Collections.sort(ans);
        return ans;
    }
    static int getLCA(int u, int v){
        if(depth[u]<depth[v]){
            int c = u;
            u = v; v = c;
        }
        u = lift(u,depth[u]-depth[v]);
        if(u==v) return u;
        for(int j=maxj;j>=0;j--){
            if(father[u][j]!=father[v][j]){
                u = father[u][j];
                v = father[v][j];
            }
        }
        return father[u][0];
    }
    static int lift(int u, int dist){
        for(int j=maxj;j>=0;j--){
            if(((1<<j)&dist)>0) u = father[u][j];
        }
        return u;
    }
    static void iniMinOnPath(){
        for(int i=1;i<=n;i++){
            if(father[i][0]==i) continue;
            minOnPath[i][0].addAll(minID[i]); // [ , ) interval would be easier to handle, presumably
        }
        for(int j=1;j<=maxj;j++){
            for(int i=1;i<=n;i++){
                ArrayList<Integer> cur = minOnPath[i][j];
                cur.addAll(minOnPath[i][j-1]);
                cur.addAll(minOnPath[father[i][j-1]][j-1]);
                Collections.sort(cur);
                while(cur.size()>maxA) cur.remove(cur.size()-1);
            }
        }
    }
    static void iniLCA(){
        dfs(1,1,0); // let vertex 1 to be the root of the whole tree
        for(int j=1;j<=maxj;j++){
            for(int i=1;i<=n;i++) father[i][j] = father[father[i][j-1]][j-1];
        }
    }
    static void dfs(int cur, int from, int level){
        depth[cur] = level;
        father[cur][0]=from;
        for(int w:graph[cur]){
            if(w!=from) dfs(w,cur,level+1);
        }
    }
    static int getMaxj(int n){
        int ans = 0, n_ = 1;
        while (n_<n){
            n_ *= 2;
            ans++;
        }
        return ans;
    }

}