By George Albuquerque Pinto, UEVA Brazil
Sherlock is a very smart boy, who was born in London in England. Since two years he always liked to solve challenges. With three years was school champion Sudoku. His uncle Paul Harrison always liked to challenge the boy bringing logic problems. This time Paul issued a challenge, but it is not only a challenge, he wants to find out his boss room password to be able to pick up some important documents of the company. Your task is to build a program that will help your uncle with this problem, given the information on the amount of oil on each key.
For example, 0 = 0.80, 1 = 12:12, 2 = 0.01, 3 = 00:22, 4 = 00:35, 5 = 12:25, 6 = 0.77, 7 = 12:50, 8 = 0.63, 9 = 0:45 and n = 5, the password will be 06,879 .
The input consists of several test cases, and is completed with file end. The first line in each case consists of an integer value N (0 < N < 11) which corresponds to the number of digits of the password. In the following section reads 10 values Vi, where (0 <= Vi <1), the i-th value corresponds to the level of oiliness i-th lock key. The higher the level oleosedade more times it has been used key. The password does not contain repeated digits formed and is formed by N digits plus ultilizados.
For each test case print a line with the message "Case k" where k indicates the test case number followed by access to the boss room password. Show results as the sample output. If two keys have the same level of greasiness, the key with the smaller value must precede the other. Print the password so that it starts showing the highest oiliness key to the smallest.
|Input Sample||Output Sample|
Caso 1: 58679