#!/usr/local/bin/perl
#
#
#
#
#
# $Id: $
#

@points = (0, 10, 6, 4, 3, 2, 1);

while(<>) {
    if (/^  ([1-6]). ([^ ]+) /) {
	$pts{$2} += $points[$1];
	$r{$m}{$2} = $points[$1];
    } elsif (/(\d\d)\.itmonkey/) {
	$m++;
	print STDERR "$m\n";
    }
}

$high = -1;
foreach $name (sort { $pts{$b} <=> $pts{$a} } keys %pts) {
    ++$i;
    if ($pts{$name} != $high) {
        $high = $pts{$name};
        $j = $i;
    }
    printf "%2d: %3d %-16s: ", $j, $high, $name;
    for($n = 1; $n <= $m; $n++) {
	printf "%2s ", $r{$n}{$name};
    }
    print "\n";
}
