A group of uniquely named friends has decided to exchange gifts of money. Each of these friends might give some money to some or all of the other friends (although some might give to no one). Likewise, each friend might receive money from any or all of the other friends. Your task is to determine, for each person, how much more money they receive than they give, based on the final balance after all gift exchanges are complete.
The gift-giving process follows these rules: Each person withdraws a certain amount of money from the bank (or other source), to be distributed as gifts. The giver divides this amount evenly among all recipients. No fractional money is available, so dividing among friends would result in for each friend, with left over. This leftover amount remains with the giver. Each participant's balance starts at , decreases by the total amount they give, and increases by the total they receive from others.
Each output balance is the (total amount received minus total amount given) for each person, in the order of input.
The first line contains the integer (1 \le n \le 100), the number of group members. Each of the following lines contains the name of a group member.
Then follows a description of gifting processes (one per person, order does not matter). Each such group is as follows:
The first line gives the name of the person giving gifts.
The second line contains two integers:
The total amount of money (in the range ) to be divided among gifts by the giver.
(0 \le g \le n), the number of friends to whom the giver will give gifts.
If is nonzero, each of the next lines contains the name of a recipient of a gift; recipients are not repeated within a single list.
Print the final balance for each group member (total received minus total given), in the order the names appear in the input. Each member's result should be printed on a separate line.
Example 1