World Championship#1324

World Championship

1 second
64 megabytes
Easy

In the finals of the World Cup in France, 16 teams are involved. The winner is determined by the Olympic system:

The probability of winning (in percentage) for each team against every other team in each group is known. It is necessary to calculate, for each team, the probability that it wins the tournament (i.e., becomes the world champion).

Input

The input consists of several tests. The first line of each test contains the number of teams in the league (4 \leq n \leq 64, is a power of two). The following lines describe the names of the teams, each of which contains no more than characters. Then, a matrix of probabilities of size n \times n is given. Cell p_{i, j} contains a non-negative integer value representing the probability (as a percentage) that the th team will win against the th team. It is guaranteed that p_{i, j} + p_{j, i} = 100.

Output

For each test case, print its number. For each team, calculate the probability (in percent) to become the World Champion. Print the country names in the same order as in the input. The team names must be left-justified in a field of characters. After each country name, print one space, then the probability percentage to win the cup, as shown below.

Examples

Example 1

Loading
Loading