ILVASCIS - Atito’s family
Atito has a very large family with two special features, they live for a really long time and there are no equally aged sons.
Atito “the father” is back from Luxor, he brought presents to every member of his family. He asked his little son Youssef A.K.A Joe to sort his family from the oldest to the youngest in order to give them the presents in an appropriate way, since Joe is small “only seven years old” he asked your help to sort the family.
Your program will be tested on one or more test cases. The first line of input will be a single integer T, the number of test cases (1<=T<=100). Each test case starts with an integer N (1<=N<=100) denotes the number of the members in the family, then it is followed by N lines, each line consists of a family member's name “without spaces” and an integer D denoting his age (1<=D<=150).
For each test case, print "Case_#i:" where 'i' is the number of the test case and '_' is a white space, followed by N line each line contains the name of the family members from the oldest to the youngest and there is a blank line between each two consecutive cases.
Ayman 19 Output: