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:
//package train1;

import java.io.*;
import java.text.CollationElementIterator;
import java.util.StringTokenizer;
import java.util.*;


public class main587C {
    public static PrintWriter out = new PrintWriter(System.out);
    public static FastScanner enter = new FastScanner(System.in);

    public static void main(String[] args) throws IOException {
        int n = enter.nextInt();
        Graph g = new Graph(n);
        g.read();
    }


    static class Graph {
        int n;
        int m;
        LinkedList<Integer>[] vert;
        HashMap<pair, Long> ed;
        boolean used[];
        int[] peopleTown;

        static class pair {
            int u, w;

            public pair(int u, int w) {
                this.u = u;
                this.w = w;
            }

            @Override
            public boolean equals(Object o) {
                if (this == o) return true;
                if (o == null || getClass() != o.getClass()) return false;
                pair pair = (pair) o;
                return u == pair.u &&
                        w == pair.w;
            }

            @Override
            public int hashCode() {

                return Objects.hash(u, w);
            }
        }

        public Graph(int n) {
            this.n = n;
            vert = new LinkedList[n + 1]; //1 ,...., n
            peopleInTown = new ArrayList[n + 1]; //1 ,...., n
            for (int i = 1; i < n + 1; i++) vert[i] = new LinkedList<>();
            for (int i = 1; i < n + 1; i++) peopleInTown[i] = new ArrayList<>();
            used = new boolean[n + 1];
            ed = new HashMap<>();
        }

        public void add(int a, int b) {
            vert[a].addLast(b);
        }

        ArrayList<Integer>[][] min10;
        ArrayList<Integer>[] peopleInTown;
        int[][] parent;
        int maxlog;

        ArrayList<Integer> ans=new ArrayList<>();
        ArrayList<Integer> ans1=new ArrayList<>();
        ArrayList<Integer> ans2=new ArrayList<>();
        public void read() throws IOException {
            m = enter.nextInt();
            int q = enter.nextInt();
            for (int i = 1; i <n ; i++) {
                int a=enter.nextInt();
                int b=enter.nextInt();
                add(a,b);
                add(b,a);
            }
            maxlog = (int) (Math.log(n + 1)/Math.log(2)) + 1;
            peopleTown = new int[m + 1];
            min10 = new ArrayList[n + 1][maxlog];
            parent = new int[n + 1][maxlog];
            for (int i = 0; i < n + 1; i++) for (int j = 0; j < maxlog; j++) min10[i][j] = new ArrayList<>();

            for (int i = 1; i < m + 1; i++) {
                peopleTown[i] = enter.nextInt();
                peopleInTown[peopleTown[i]].add(i);
            }
            for (int i = 1; i <n+1 ; i++) {
                Collections.sort(peopleInTown[i]);
                int tmp=peopleInTown[i].size()-10;
                while(tmp>0){
                    peopleInTown[i].remove(peopleInTown[i].size()-1);
                    tmp--;
                }
            }
            fillArr();
            for (int i = 0; i <q ; i++) {
                int a=enter.nextInt();
                int b=enter.nextInt();
                int c=enter.nextInt();
                ans=lca(a,b);
                out.print(Math.min(ans.size(),c)+" ");
                for (int j = 0; j <Math.min(ans.size(),c) ; j++) {
                    out.print(ans.get(j)+" ");
                }
                out.println();
            }
            out.close();

        }

         void fillArr() {
            h=new int[n+1];
            DFSForFill(1);
        }

        int h[];
        ArrayList<Integer> lca(int u, int v){
            if(h[u]<h[v]){
                int tmp=u;
                u=v;
                v=tmp;
            }
            ArrayList<Integer> tmpArr=new ArrayList<>();
            //now h[v]<=h[u]
            for (int i = maxlog-1; i >=0 ; i--) {
                if(parent[u][i]>=1 && h[parent[u][i]]>=h[v]){
                    tmpArr=mergefrom12To3(tmpArr, min10[u][i]);
                    u=parent[u][i];
                }
            }
            if(u==v) {
                tmpArr=mergefrom12To3(tmpArr,peopleInTown[u]);
                return tmpArr;
            }
            //now h[u]=h[v]
            for (int i = maxlog-1; i >=0 ; i--) {
                if(parent[u][i]!=parent[v][i]){
                    tmpArr=mergefrom12To3(tmpArr, min10[u][i]);
                    tmpArr=mergefrom12To3(tmpArr, min10[v][i]);
                    u=parent[u][i];
                    v=parent[v][i];
                }
            }
            tmpArr=mergefrom12To3(tmpArr, min10[u][0]);
            tmpArr=mergefrom12To3(tmpArr, min10[v][0]);
            tmpArr=mergefrom12To3(tmpArr, peopleInTown[parent[v][0]]);
            return tmpArr;

        }

        void DFSUtilForFill(int v, boolean was[], int from) {
            was[v] = true;
            parent[v][0] = from;
            min10[v][0].addAll(peopleInTown[v]);
            Collections.sort(min10[v][0]);
            int tmp = min10[v][0].size() - 10;
            while (tmp > 0) {
                min10[v][0].remove(min10[v][0].size() - 1);
                tmp--;
            }
            for (int i = 1; i < maxlog; i++) {
                if (parent[v][i - 1] >= 1) {
                    parent[v][i] = parent[parent[v][i - 1]][i - 1];
                    min10[v][i]=mergefrom12To3(min10[v][i - 1], min10[parent[v][i - 1]][i - 1]);
                }
            }
            for (int n : vert[v]) {
                if (!was[n]) {
                    h[n]=h[v]+1;
                    DFSUtilForFill(n, was, v);
                }
            }
        }

        public ArrayList<Integer> mergefrom12To3(ArrayList<Integer> a1, ArrayList<Integer> a2) {
            ArrayList<Integer> a3=new ArrayList<>();
            int first1=0;
            int first2=0;
            while(first1<Math.min(a1.size(),10) && first2<Math.min(10, a2.size())){
                if(a1.get(first1)<a2.get(first2)) {
                    a3.add(a1.get(first1));
                    first1++;
                }
                else{
                    a3.add(a2.get(first2));
                    first2++;
                }
            }
            while(first1<Math.min(a1.size(),10)){
                a3.add(a1.get(first1));
                first1++;
            }
            while(first2<Math.min(a2.size(),10)){
                a3.add(a2.get(first2));
                first2++;
            }
            return a3;

        }

        void DFSForFill(int v) {
            boolean was[] = new boolean[n + 1];
            DFSUtilForFill(v, was, -1);
        }

        void DFSUtil(int v, boolean was[]) {
            was[v] = true;

            for (int n : vert[v]) {
                if (!was[n]) {
                    DFSUtil(n, was);
                }
            }
        }

        void DFS(int v) {
            boolean was[] = new boolean[n + 1];
            DFSUtil(v, was);
        }


    }

    static class FastScanner {
        BufferedReader br;
        StringTokenizer stok;

        FastScanner(InputStream is) {
            br = new BufferedReader(new InputStreamReader(is));
        }

        String next() throws IOException {
            while (stok == null || !stok.hasMoreTokens()) {
                String s = br.readLine();
                if (s == null) {
                    return null;
                }
                stok = new StringTokenizer(s);
            }
            return stok.nextToken();
        }

        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        char nextChar() throws IOException {
            return (char) (br.read());
        }

        String nextLine() throws IOException {
            return br.readLine();
        }
    }
}