URI Online Judge | 2252

Discovering Password

By George Albuquerque Pinto, UEVA BR Brazil

Timelimit: 1

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 .

Input

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.

Output

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

5
0.02 0.23 0.07 0.18 0.17 0.72 0.48 0.36 0.67 0.35
4
0.76 0.52 0.74 0.19 0.15 0.99 0.13 0.59 0.48 0.45
4
0.83 0.86 0.37 0.16 0.41 0.38 0.36 0.67 0.32 0.20

Caso 1: 58679
Caso 2: 5027
Caso 3: 1074