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 *c*<sub class="lower-index">*i*</sub>. Note that there may be more than one person in a city, also there may be no people living in the city.

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 *p*<sub class="lower-index">1</sub>, *p*<sub class="lower-index">2</sub>, ..., *p*<sub class="lower-index">*x*</sub> in increasing order. 

If *k* = *min*(*x*, *a*), then Duff should tell Malek numbers *k*, *p*<sub class="lower-index">1</sub>, *p*<sub class="lower-index">2</sub>, ..., *p*<sub class="lower-index">*k*</sub> 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.
The first line of input contains three integers, *n*, *m* and *q* (1 ≤ *n*, *m*, *q* ≤ 10<sup class="upper-index">5</sup>).

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 *c*<sub class="lower-index">1</sub>, *c*<sub class="lower-index">2</sub>, ..., *c*<sub class="lower-index">*m*</sub> separated by spaces (1 ≤ *c*<sub class="lower-index">*i*</sub> ≤ *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).
import fractions
import gc
import heapq
import itertools
from itertools import combinations, permutations
import math
import random
from collections import Counter, deque, defaultdict
from sys import stdout
import time
from math import factorial, log, gcd
import sys
from decimal import Decimal
import threading
from heapq import *
from fractions import Fraction
from bisect import bisect_left, bisect_right


def S():
	return sys.stdin.readline().split()


def I():
	return [int(i) for i in sys.stdin.readline().split()]


def II():
	return int(sys.stdin.readline())


def IS():
	return sys.stdin.readline().replace('\n', '')


def main():
	n, m, q = I()
	tree = [[] for _ in range(n)]
	for _ in range(n - 1):
		u, v = I()
		tree[u - 1].append(v - 1)
		tree[v - 1].append(u - 1)
	cities = [0] * n
	cities_heaps = [[] for _ in range(n)]
	c = I()
	for i in range(m):
		cities[c[i] - 1] += 1
		heapq.heappush(cities_heaps[c[i] - 1], -i - 1)
	for i in range(n):
		while len(cities_heaps[i]) > 10:
			cities_heaps[i].pop()
	
	up_index = [[i] * (logs[n] + 1) for i in range(n)]
	up_array = [[[] for _ in range(logs[n] + 1)] for i in range(n)]
	queue = deque([(0, 0)])
	heights = [0] * n
	parents = [0] * n
	while queue:
		v, h = queue.pop()
		for u in tree[v]:
			if parents[v] != u:
				parents[u] = v
				heights[u] = h + 1
				up_index[u][0] = v
				up_array[u][0] = cities_heaps[u]
				queue.append((u, h + 1))
	for i in range(1, logs[n] + 1):
		for v in range(n):
			next_v = up_index[v][i - 1]
			up_index[v][i] = up_index[next_v][i - 1]
			res = list(heapq.merge(up_array[v][i - 1],
			                  up_array[next_v][i - 1]))
			heapq.heapify(res)
			while len(res) > 10:
				heapq.heappop(res)
			up_array[v][i] = res
	# for i in range(logs[n] + 1):
	# 	up_array[0][i] = cities_heaps[0]
			
	# print(up_array)
	for _ in range(q):
		v, u, a = I()
		v, u = v - 1, u - 1
		if heights[v] > heights[u]:
			v, u = u, v
		r = heights[u] - heights[v]
		m = []
		for i in range(logs[n] + 1):
			if (r >> i) & 1 == 1:
				m = list(heapq.merge(m, up_array[u][i]))
				heapq.heapify(m)
				u = up_index[u][i]
		# print(v, u, m, 'ways')
		if u != v:
			for i in range(logs[n], -1, -1):
				next_u, next_v = up_index[u][i], up_index[v][i]
				if next_u != next_v:
					m = list(heapq.merge(m, up_array[u][i], up_array[v][i]))
					heapq.heapify(m)
					v, u = next_v, next_u
			m = list(heapq.merge(m, cities_heaps[up_index[u][0]], up_array[u][1], up_array[v][1]))
		else:
			m = list(heapq.merge(m, cities_heaps[u]))
		heapq.heapify(m)
		while len(m) > a:
			heapq.heappop(m)
		ans = []
		for i in range(len(m)):
			ans.append(-heapq.heappop(m))
		ans = ans[::-1]
		print(len(ans), *ans)
	


if __name__ == '__main__':
	logs = [0] * (2 * 10 ** 5 + 50)
	for log in range(2, len(logs)):
		logs[log] = logs[log // 2] + 1
	# for _ in range(II()):
	# 	main()
	main()