Description
Garlic, a wanderlust since she was 16, has been traveling for a living. She particularly likes driving to places and
practically spends about 80% of her life on the road.
One day as Garlic was exploring the beauty of Rio de Janiero, she met a guy named Hilario.
Hilario loves big bikes and spends most of his time with it. Meeting Garlic, Hilario decided to name his big bike after her.
Free as they are, after skydiving, they rode Hilario's big bike to the weirdest towns in the world.
Be their travel guide and help them identify various routes they can take from one town to another.
Input Format
The input file begins with an integer J, where 0 < J <= 100, that defines the number of test cases. Each test case
consists of three lines. The first line contains a positive integer N <= 500, that specifies the number of towns. The
second line is a sequence of towns Town1 to TownN, each separated by a comma. The last line contains N-1 positive
integers indicating the number of roads one could take from Town1 to Town2, Town2 to Town3, ... , TownN-1 to TownN.
Output Format
For each test case, output the possible routes Garlic and Hilario could take to travel from Town1 to TownN.
This is not a place for just dumping homework questions and expecting people to write them for you. We'll help you with specific issues or questions you have, but we're not going to write your code for you.