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.io.*;
import java.util.*;

/**
 * Created by slycer on 10/15/15.
 *
 * http://codeforces.com/contest/588/problem/E
 *
 */
public class DuffintheArmy {

    public static Map<Integer, List<Integer>> graf = new HashMap();
    public static Map<Integer, List<Integer>> people  = new HashMap();

    public static int [] l = new int[ 100000+1 ]; // adancimea nodului i avand nodul 1 ca radacina
    public static int [] p = new int[ 100000+1 ]; // parintele nodului i avand nodul 1 ca radacina
    public static int [][] back;
    public static int [][][] ids;
    public static int LOG=0;


    public static void main ( String [] args ) throws IOException {
        BufferedReader reader = new BufferedReader(  new InputStreamReader( System.in ) );
        String [] aux = reader.readLine().split( " " );
        int n = Integer.valueOf( aux[0] );
        int m = Integer.valueOf( aux[1] );
        int q = Integer.valueOf( aux[2] );
        for ( int i=1; i<=n; i++ ){
            graf.put( i, new ArrayList() );
            people.put( i, new ArrayList() );
        }

        for ( int i=1; i<=n-1; i++ ){
            aux = reader.readLine().split( " " );
            int u =  Integer.valueOf( aux[0] );
            int v =  Integer.valueOf( aux[1] );
            graf.get( u ).add( v );
            graf.get( v ).add( u );
        }

        aux = reader.readLine().split( " " );
        for ( int i=1; i<=m; i++ ){
            int town =  Integer.valueOf( aux[i-1] );
            // the people with id i is living in town
            people.get(town).add( i );
        }

        int k = n;
        while ( k >= 2 ){
            LOG ++;
            k=k/2;
        }



        fill( 1, -1, new boolean[n+1], 0 );

        back = new int[n+1][LOG+1];
        ids = new int[n+1][LOG+1][11];

        for ( int i=1; i<=n; i++ ){
            back[i][0] = p[i];
            List<Integer> integers = people.get(i);
            Collections.sort( integers );
            //ids[i][0] = first ( integers, 10 ) ;
            int pos=0;
            for (  ; pos<Math.min(10,integers.size()); pos ++ ){
                ids[i][0][pos] = integers.get(pos);
            }
            // 0 is the end
        }

        // simple dp
        for ( int log=1; log<=LOG; log++ ){
            for ( int i=1; i<=n; i++ ){
                if ( back[i][log-1] != -1 ){
                    back[i][log] = back[ back[i][log-1] ][ log - 1 ];
                    int [] x =   ids[ i ][log-1];
                    int [] forward = ids[ back[i][log-1] ][ log - 1 ];
                    if ( forward != null ){
                        join( x, forward, ids[i][log] );
                    }


                } else {
                    back[i][log] = -1; // parintele este afara
                }
            }
        }

        PrintWriter output = new PrintWriter( System.out );


        for ( int i=1; i<=q; i++ ){
            aux = reader.readLine().split( " " );
            int u = Integer.valueOf( aux[0] );
            int v = Integer.valueOf( aux[1] );
            int a = Integer.valueOf( aux[2] );
            Top data = lca( u, v, a );

            output.print( data.q.size() + " " );

            Stack<Integer> stack = new Stack<>();
            while ( data.q.size() > 0 ){
                stack.add( data.q.poll() );
            }
            while ( stack.size() > 0 ){
                output.print( stack.pop() + " " );
            }
            output.println();
        }

        output.close();;
    }

    public static Top lca( int u, int v, int k  ){
        if ( l[u] < l[v] ){
            int aux = u;
            u = v;
            v = aux;
        }

        Top top = new Top( k );

        // l[u] >= l[v]
        for ( int i=LOG; i>=0; i-- ){
            if ( back[u][i] != -1 && l[ back[u][i] ] >= l[v] ) {
                top.addAll( ids[u][i] );
                u =  back[u][i];
            }
        }

        if ( l[u] != l[v] ){
            throw new RuntimeException( "asa da" );
        }

        // now we have l[u] == l[v]
        for ( int i=LOG; i>=0; i-- ){
            if ( back[u][i] != back[v][i] ){
                top.addAll( ids[u][i] );
                top.addAll( ids[v][i] );
                u = back[u][i];
                v = back[v][i];
            }
        }

        if ( u!=v ){
            top.addAll( ids[u][0] );
            top.addAll( ids[v][0] );
            u = back[u][0]; // lca
            top.addAll( ids[u][0] );
        } else {
            top.addAll(ids[u][0]);
        }

        return top;

    }

    public static void join( int [] a, int [] b, int [] c ){
        // c este destinatia;
        int i,j,k;
        i = 0;
        j = 0;
        k = 0;
        while ( a[i] != 0 || b[j] != 0 ){
            int next=0;
            if ( a[i] !=0 && b[j] != 0 ){
                if ( a[i] < b[j] ){
                    next = a[i];
                    i++;
                } else {
                    next = b[j];
                    j++;
                }
            } else
            if ( a[i] == 0 && b[j] != 0 ){
                next = b[j];
                j++;
            } else
            if ( a[i] != 0 && b[j] == 0 ){
                next = a[i];
                i++;
            }
            c[k] = next;
            k++;
            if ( k == 10 ) {
                break; // k is the first free position
            }
        }
    }

    public static List<Integer> first( List<Integer> data, int k ){
        return data.subList(0, Math.min( data.size(), k ) );
    }

    public static void fill( int currentNode, int prevNode, boolean [] visited, int depth ){
        visited[ currentNode ] = true;
        p[ currentNode ] = prevNode;
        l[ currentNode ] = depth;
        for ( int current : graf.get( currentNode ) ){
            if ( !visited[ current ] ){
                fill ( current, currentNode, visited, depth + 1 );
            }
        }
    }

    static class  Top {
        public PriorityQueue<Integer> q = new PriorityQueue<>( (o1, o2) -> -o1.compareTo(o2) );
        int limit;
        public Top( int limit ) {
            this.limit = limit;
        }

        public void addAll( int [] data ){
            for ( int i : data ){
                if ( i == 0 ){
                    break;
                }
                add( i );
            }
        }

        public void add( int value ){
            if ( q.size() < limit ){
                q.add( value );
            } else {
                if ( q.peek() > value ){
                    q.poll();
                    q.add( value );
                }
            }

        }

    }
}