You know, every country's currency has an exchange rate to another country.
For example, 'Dollir' : 'RNB' is 1 : 6.
And exchanging from one currency to another currency, it will have a wastage.
Now give some currency and their each wastage from one currency exchanges to another. For every currency, you should tell me when it exchanges to other currency and finally exchanges to itself, the minimum wastage it will cost.
For each case, you may output N lines.
Each line is an decimal, indicates exchanging from ith currency and finally it exchanges to itself, the minimum wastage it will cost.
Two decimal places.