TT spent long time to finish her job. They started their trip, soon they met a hard problem: there are many small demons in the way. Only fight can they continue. Seen the T-shirts her soldiers wear, TT decided to buy them some equipments to promote them. Every soldier need three things, weapon、shield and armour. The shop have N weapons 、M shields and T armours. Every equipment has a power number. TT should calculate a full equiped soldier's power. If two things have the same power, list by lexicographic order.
For each case, first output "Case i:" in a single line. Next output the name of all full equiped soldier's equipment(three things) and the sum of power in a single line.
Case 1:
c fg erf 97
a de fe 40