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.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.StringTokenizer;

public class Main {
	public static void main(String[] args) throws IOException {
		new Thread(null, new Runnable() {
			public void run() {
				try {
					long prevTime = System.currentTimeMillis();
					new Main().run();
					System.err.println("Total time: "
							+ (System.currentTimeMillis() - prevTime) + " ms");
					System.err.println("Memory status: " + memoryStatus());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}, "1", 1L << 24).start();
	}

	void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		Object o = solve();
		if (o != null)
			out.println(o);
		out.close();
		in.close();
	}

	private Object solve() throws IOException {
		int n = ni();
		int m = ni();
		int q = ni();
		
		int H = log2(n);
		
		List<Integer>[] tree = (List<Integer>[]) new List[n];
		for(int i =0 ;i <n;i++)
			tree[i] = new ArrayList<Integer>();
		for(int i =0;i<n-1;i++){
			int u = ni()-1;
			int v = ni()-1;
			tree[u].add(v);
			tree[v].add(u);
		}
		
		List<Integer>[] people = (List<Integer>[]) new List[n];
		for(int i =0;i<n;i++)
			people[i] = new ArrayList<Integer>();
		
		List<Integer> [][] dp_aux = (List<Integer> [][]) new List[n][H+1];	//nodo, h : 10 mejores entre los 2^h nodos ancentros incluyendose
		for(int i =0;i<n;i++)
			for(int j = 0;j<=H;j++)
				dp_aux[i][j]= new ArrayList<Integer>();
		
		LCA lca= new LCA(tree,0); 
		for(int i =0;i<m;i++){
			int c = ni() -1;
			dp_aux[c][0].add(i);
		}
		for(int i =0;i<n;i++)
			for(int j = 0;j<=H;j++)
				Collections.sort(dp_aux[i][j]);
		
		int[][][] dp = new int[n][H+1][];
		for(int i =0;i<n;i++)
			for(int j = 0;j<=H;j++){
				int nn = Math.min(10, dp_aux[i][j].size());
				dp[i][j] = new int[nn];
				for(int k =0;k<nn;k++)
					dp[i][j][k] = dp_aux[i][j].get(k);
				
			}
		
		for(int len =1;len<= H;len++)
			for(int i=0;i<n;i++){
				int parent = lca.dp[i][len-1];
				if(parent != -1){
					dp[i][len] = merge(dp[i][len-1], dp[parent][len-1]);
				} else{
					dp[i][len] = dp[i][len-1];
				}
			}
		
		for(int i =0;i<q;i++){
			int u = ni()-1;
			int v = ni()-1;
			
			int ancestor = lca.query(u, v);
			int a = ni();
			
			int[] left = get(dp, lca,u, ancestor);
			int[] right = get(dp,lca,v, ancestor);

			int[] aux = merge(merge(left,right), dp[ancestor][0] );
			out.print(Math.min(aux.length, a));
			for(int index =0;index < aux.length && index < a; index++)
				out.print(" "+(aux[index]+ 1));
			out.println();
		}
		return null;
	}
	
	private int[] merge(int[] arr1, int[] arr2) {
		int n1 = arr1.length;
		int n2 = arr2.length;

		int[] ret = new int[10];

		int i = 0;
		int j = 0;
		int index = 0;
		while ((i < n1 || j < n2) && index < 10) {
			int aux = -1;
			if (i == n1) {
				aux = arr2[j];
			} else if (j == n2) {
				aux = arr1[i];
			} else {
				if (arr1[i] < arr2[j]) {
					aux = arr1[i];
				} else {
					aux = arr2[j];
				}

			}
			ret[index++] = aux;
			while (i < n1 && arr1[i] == aux)
				i++;
			while (j < n2 && arr2[j] == aux)
				j++;

		}
		return Arrays.copyOf(ret, index);
	}

	private int[] get(int[][][] dp, LCA lca, int semi_leaf, int semi_root) {
		int diff = lca.level[semi_leaf] - lca.level[semi_root];
		if(diff == 0)
			return dp[semi_leaf][0];
		int len = log2(diff);
		
		return merge(dp[semi_leaf][len], dp[lca.up(semi_leaf, diff- (1<<len))][len]);
	}

	// si recibe 0 explota el mundo
	int log2(int b) {
		return 31 - Integer.numberOfLeadingZeros(b);
	}
	
	class LCA {
		int root;

		int N;
		int H;
		int[][] dp; // nodo, 2^j ancestro. Notar que dp[i][0] devuelve parent[i], no
					// i. Osea 2^j es el tamano del camino
		int[] parent;
		int[] level;

		// requiere: es un tree, puede tener aristas no dirigidas
		LCA(List<Integer>[] tree, int root) {
			this.root = root;
			this.N = tree.length;
			this.H = log2(N);

			level = new int[N];
			parent = new int[N];
			Arrays.fill(parent, -1);
			level[root] = 0;

			for (int v : tree[root]) {
				level[v] = 1;
				parent[v] = root;
				dfs(tree, root, v);
			}

			dp = new int[N][H + 1];
			for (int i = 0; i < N; i++)
				dp[i][0] = parent[i];

			for (int h = 1; h <= H; h++)
				for (int i = 0; i < N; i++)
					if (dp[i][h - 1] != -1) {
						dp[i][h] = dp[dp[i][h - 1]][h - 1];
					} else {
						dp[i][h] = -1;
					}
		}

		// si recibe 0 explota el mundo
		int log2(int b) {
			return 31 - Integer.numberOfLeadingZeros(b);
		}

		void dfs(List<Integer>[] tree, int prev, int u) {
			for (int v : tree[u])
				if (v != prev) {
					level[v] = 1 + level[u];
					parent[v] = u;
					dfs(tree, u, v);
				}
		}

		int query(int u, int v) {
			if (level[u] > level[v]) {
				int tmp = u;
				u = v;
				v = tmp;
			}
			v = up(v, level[v] - level[u]);
			if (u == v)
				return u;
			for (int i = H; i >= 0; i--) {
				int uu = dp[u][i];
				int vv = dp[v][i];

				if (uu != vv) {
					u = uu;
					v = vv;
				}
			}

			return parent[u];
		}

		// explota si se pasa de la raiz, tengo esa informacion en level
		int up(int u, int len) {
			int ret = u;
			for (int i = 0; i <= H; i++)
				if ((len & (1 << i)) != 0)
					ret = dp[ret][i];

			return ret;
		}
	}
	
	BufferedReader in;
	PrintWriter out;
	StringTokenizer strTok = new StringTokenizer("");

	String nextToken() throws IOException {
		while (!strTok.hasMoreTokens())
			strTok = new StringTokenizer(in.readLine());
		return strTok.nextToken();
	}

	int ni() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nl() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nd() throws IOException {
		return Double.parseDouble(nextToken());
	}

	int[] nia(int size) throws IOException {
		int[] ret = new int[size];
		for (int i = 0; i < size; i++)
			ret[i] = ni();
		return ret;
	}

	long[] nla(int size) throws IOException {
		long[] ret = new long[size];
		for (int i = 0; i < size; i++)
			ret[i] = nl();
		return ret;
	}

	double[] nda(int size) throws IOException {
		double[] ret = new double[size];
		for (int i = 0; i < size; i++)
			ret[i] = nd();
		return ret;
	}

	String nextLine() throws IOException {
		strTok = new StringTokenizer("");
		return in.readLine();
	}

	boolean EOF() throws IOException {
		while (!strTok.hasMoreTokens()) {
			String s = in.readLine();
			if (s == null)
				return true;
			strTok = new StringTokenizer(s);
		}
		return false;
	}

	void printRepeat(String s, int count) {
		for (int i = 0; i < count; i++)
			out.print(s);
	}

	void printArray(int[] array) {
		for (int i = 0; i < array.length; i++) {
			if (i > 0)
				out.print(' ');
			out.print(array[i]);
		}
		out.println();
	}

	void printArray(long[] array) {
		for (int i = 0; i < array.length; i++) {
			if (i > 0)
				out.print(' ');
			out.print(array[i]);
		}
		out.println();
	}

	void printArray(double[] array) {
		for (int i = 0; i < array.length; i++) {
			if (i > 0)
				out.print(' ');
			out.print(array[i]);
		}
		out.println();
	}

	void printArray(double[] array, String spec) {
		for (int i = 0; i < array.length; i++) {
			if (i > 0)
				out.print(' ');
			out.printf(Locale.US, spec, array[i]);
		}
		out.println();
	}

	void printArray(Object[] array) {
		boolean blank = false;
		for (Object x : array) {
			if (blank)
				out.print(' ');
			else
				blank = true;
			out.print(x);
		}
		out.println();
	}

	@SuppressWarnings("rawtypes")
	void printCollection(Collection collection) {
		boolean blank = false;
		for (Object x : collection) {
			if (blank)
				out.print(' ');
			else
				blank = true;
			out.print(x);
		}
		out.println();
	}

	static String memoryStatus() {
		return (Runtime.getRuntime().totalMemory()
				- Runtime.getRuntime().freeMemory() >> 20)
				+ "/" + (Runtime.getRuntime().totalMemory() >> 20) + " MB";
	}

	public void pln() {
		out.println();
	}

	public void pln(int arg) {
		out.println(arg);
	}

	public void pln(long arg) {
		out.println(arg);
	}

	public void pln(double arg) {
		out.println(arg);
	}

	public void pln(String arg) {
		out.println(arg);
	}

	public void pln(boolean arg) {
		out.println(arg);
	}

	public void pln(char arg) {
		out.println(arg);
	}

	public void pln(float arg) {
		out.println(arg);
	}

	public void pln(Object arg) {
		out.println(arg);
	}

	public void p(int arg) {
		out.print(arg);
	}

	public void p(long arg) {
		out.print(arg);
	}

	public void p(double arg) {
		out.print(arg);
	}

	public void p(String arg) {
		out.print(arg);
	}

	public void p(boolean arg) {
		out.print(arg);
	}

	public void p(char arg) {
		out.print(arg);
	}

	public void p(float arg) {
		out.print(arg);
	}

	public void p(Object arg) {
		out.print(arg);
	}

}