A Day at the Races#1339

A Day at the Races

1 second
64 megabytes
Very easy

Formula One is the highest class of motor racing. A typical Formula One season consists of a series of races called "Grands Prix," where constructors such as Ferrari, Renault, and others compete with one or more cars driven by the world's best drivers. Throughout the season, teams compete in two parallel championships: the drivers' championship and the teams' championship.

In the drivers' championship, drivers aim to achieve the highest total number of points by the end of the season. According to the rules, the top eight drivers in each Grand Prix receive , , , , , , , and points respectively. In case of a tie in points, the driver with the most first places takes the lead. If still tied, the number of second places is considered, and so on through eighth places. If a tie remains, drivers are sorted lexicographically by their last names, and then by their first names.

After each race, the points gained by each driver are added to their team's total, and at the end of the season, the team with the most points wins the teams' championship. To add excitement, team sponsors are allowed to recruit drivers from other teams even during the same season. In case of a tie in points between teams, teams are sorted lexicographically by their names. In this problem, you are given data for a Formula One season and are asked to process this data according to the rules above to determine both the drivers' and teams' standings.

Input

Your program will be tested on one or more data-sets, each representing a Formula One season. All input lines are at most characters long. By studying the sample I/O, you will discover that the first line of each season contains an integer , where 0 < N < 32, representing the number of Grands Prix that season. For each Grand Prix, the name of the Grand Prix appears on a single line (maximum length characters), followed by a table of the first name, last name, and team name of the top eight drivers, from to , in that Grand Prix. Each first name and last name is a sequence of printable ASCII characters, no longer than characters, and contains no spaces. Each team name is a sequence of printable ASCII characters, no longer than characters, and may contain spaces (but no leading or trailing spaces). Each team name is followed by a single period '.', which is not part of the name. There may be trailing whitespace. A line consisting of three hyphens '-' follows the listing of each Grand Prix. The last line of the input file contains a single zero.

Output

For each data set in the input, you must print "Season k:" where is the data-set number (starting from ). The next line must state "Drivers Standing:". On subsequent lines, list the drivers' standings for that season. For each driver, print their first and last names separated by exactly one space and left-justified in a field of width , followed by a single space, then the total number of points achieved by the driver during the season. The drivers' standing should be followed by a blank line.

The following line must state "Teams Standing:". On subsequent lines, list the teams' standings for that season. For each team, print the team name left-justified in a field of width , followed by a single space, then the total number of points the team has scored during the season. The teams' standing should be followed by a blank line.

Examples

Example 1

Loading
Loading