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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main{

	public static void main(String[] args) throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		int n=nextInt(); //nodes
		int m=nextInt(); //persons
		int q=nextInt(); //queries
		ArrayList<Integer> [] graph=new ArrayList[n+1];
		int [] tree=new int[n+1]; //the father of each node
		int [] depth=new int[n+1]; //distance from the node to the root
		Structure [] originals=new Structure[n+1];
		int logaritmo=Log2(n);
		int [][] table=new int [n+1][logaritmo+1];
		Structure [][] living=new Structure[n+1][logaritmo+1];
		for (int i = 1; i <n+1; i++) {
			graph[i]=new ArrayList<>();
			originals[i]=new Structure();
			living[i][0]=new Structure();
			depth[i]=-1;
		}
		for (int i = 0; i <n-1; i++) {
			int a=nextInt();
			int b=nextInt();
			graph[a].add(b);
			graph[b].add(a);
		}
		for (int i = 1; i <=m; i++) {
			int city=nextInt();
			originals[city].add(i);
		}
		/*for (int i = 1; i <=n; i++) {
			System.out.print("lista "+i+": ");
			for(Integer t:originals[i]){
				System.out.print(t+" ");
			}
			System.out.println();
		}
		System.out.println();*/
		tree[1]=-1; //the root has no parent
		dfs(1,graph,depth,0,tree);
		lca_preprocess(table, n, logaritmo, tree,living, originals);
		/*for (int i =1; i <n+1; i++) {
			for (int j = 0; j <logaritmo+1; j++) {
				System.out.println("imprimiendo "+i+" "+j);
				System.out.println();
				for (int j2:living[i][j]) {
					System.out.print(j2+" ");
				}
				System.out.println();
			}
		}*/
		for (int i = 0; i<q; i++) {
			int a=nextInt();
			int b=nextInt();
			int cant=nextInt();
			Structure answer=new Structure();
			if(a==b){
				answer.copy(originals[a]);
			}
			else{
				answer=lca(a,b,depth,table,logaritmo,living,originals);
			}
			if(answer.size<cant){
				System.out.print(answer.size);
			}
			else{
				System.out.print(cant);
			}
			for (int j = 0;j<cant && j<answer.size; j++) {
				System.out.print(" "+answer.array[j]);
			}
			System.out.println();
		}
	}
	
	public static void dfs(int v,ArrayList<Integer> []g,int []d,int depth,int []tree){
		if(d[v]==-1){ //not visited
			d[v]=depth;
			for (int i = 0; i < g[v].size(); i++) {
				int vecino=g[v].get(i);
				if(d[vecino]==-1){ //not visited
					dfs(vecino,g,d,depth+1,tree);
					tree[vecino]=v;
				}
			}
		}
	}
		
	public static int Log2(int x){
		int y=x;
		int ans = 0;
		while (y != 1){
		    ans++;
		    y>>=1;
		}
		return ans;
	}
	
	/*public static void copyList(PriorityQueue<Integer> p1,PriorityQueue<Integer> p2){
		for (Integer i:p2) {
			p1.add(i);
		}
	}
	
	public static PriorityQueue<Integer> checkPriority(PriorityQueue<Integer> p){
		if(p.size()>10){
			PriorityQueue<Integer> temp=new PriorityQueue<>();
			for (int i = 0; i <10; i++) {
				temp.add(p.poll());
			}
			return temp;
		}
		else{
			return p;
		}
	}*/
		
	public static void lca_preprocess(int [][] t,int n,int log,int[] tree,
										Structure [][] p,Structure [] orig){
		for (int i = 1; i <=n; i++) {
			t[i][0]=tree[i]; //la primera columna es los padres de cada nodo
			if(tree[i]!=-1){
				p[i][0].copy(orig[tree[i]]);
			}
			for (int j = 1; j <=log; j++) {
				t[i][j]=-1;
	        	p[i][j]=new Structure();
			}
		}
		for(int j = 1; j <=log; ++j){
	        for(int i = 1 ; i <=n ; ++i){
            	int temp=t[i][j-1];
	            if(temp!= -1){
	            	t[i][j] =t[temp][j-1] ;
	            	p[i][j].copy(p[i][j-1]);
	            	p[i][j].addAll(p[temp][j-1]);
	            }
	        }
	    }
	} 
	
	public static Structure lca(int u ,int v,int[] level,int [][] t,int logN,
								Structure [][]p,Structure []orig){
		if(level[u] < level[v]){
	        int temp=u;
	        u=v;
	        v=temp;
	    }
		Structure list=new Structure();
		list.copy(orig[u]);
	    int distance = level[u] - level[v] ; 
    	while(distance > 0){
	        int raise_by = Log2(distance); //logaritmo base 2 de distance
	        list.addAll(p[u][raise_by]);
	        u = t[u][raise_by];
	        int temp=1 << raise_by;
	        distance -= temp;
	    }
	    if(u == v){
	        return list; 
	    }
	    list.addAll(orig[v]);
	    for(int j = logN; j >= 0 ; --j){
	        if((t[u][j] != -1) && (t[u][j] != t[v][j])){
	        	list.addAll(p[u][j]);
		        list.addAll(p[v][j]);
		        u = t[u][j] ; 
	            v = t[v][j] ;  
	        }
	    }
	    list.addAll(p[u][0]);
        return list;
	}

	public static class Structure{
		int [] array;
		int size;
		
		public Structure(){
			array=new int[10];
			Arrays.fill(array,150000); 
			size=0;
		}
		
		public boolean add(int i){
			if(size==0){
				array[0]=i;
				size++;
				return true;
			}
			else{
				if(size<10){
					array[size]=i;
					size++;
				}
				else{
					if(array[9]>i){
						array[9]=i;
					}
					else{
						return false;
					}
				}
				int index=size-1;
				while(index>0 && array[index-1]>array[index]){
					int temp=array[index-1];
					array[index-1]=array[index];
					array[index]=temp;
					index--;
				}
				return true;
			}
		}
		
		public void addAll(Structure s){
			int i=0;
			while(i <s.size && add(s.array[i++]));
		}
		
		public void copy(Structure s){
			size=s.size;
			for (int i = 0; i <size; i++) {
				array[i]=s.array[i];
			}
		}
	}
	
	static BufferedReader in;
	static StringTokenizer str;
	static String SK;
	
	public static String next() throws IOException {
		while ((str == null) || (!str.hasMoreTokens())) {
			SK = in.readLine();
			if (SK == null)
				return null;
			str = new StringTokenizer(SK);
		}
		return str.nextToken();
	}
		
	public static int nextInt() throws IOException {
		return Integer.parseInt(next());
	}
		
	public static double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}
		
	public static long nextLong() throws IOException {
		return Long.parseLong(next());
	}
		
	public static char[] charArray() throws IOException{
		return next().toCharArray();
	}
}