The first 4 lines of every case contain 9 integers each: the costs of the 36 characters in the order given above. Then follows the number of queries on a line by itself. Every query appears on a line by itself and is formed by a number between 0 and 2000000000 in decimal format.
For every case in the input, print one line 'Case X:', without the quotes, where X is the case number starting from 1.
For every query within a case print one line 'Cheapest base(s) for number Y :' followed by the cheapest base(s) in increasing order, separated by one space. Y is the query in decimal format. Print a blank line between cases.
The numbers in the second sample output are actually all in one line just like the first sample output. Due to lack of horizontal space they are shown broken in two lines.