#!/usr/bin/perl -W -w

#while (my $team1 = <>)
#{
#    if ($team1 =~ /^[A-Z]/) { next; }
#    chomp($team1);
#    $team1 =~ s/[0-9]//g;
#    $team1 =~ s/^  //;
#    $_ = <>;
#    my ($team2, $score1) = /^ [0-9]* ([^\t]*) \t([0-9]+)/;
#    $_ = <>;
#    my ($score2) = /^([0-9]+)/;
#    print "$team1: $score1, $team2: $score2\n";
#}

#while (<>)
#{
#    next unless /Final   1   2   T/;
#    $_ = <>;
#    my ($team1, $dummy1, $score1) = /[0-9]* ?([^«	]*)( «)?	[0-9]*	[0-9]*	([0-9]*)/;
#    $_ = <>;
#    my ($team2, $dummy2, $score2) = /[0-9]* ?([^«	]*)( «)?	[0-9]*	[0-9]*	([0-9]*)/;
#    print "$team1: $score1 -- $team2: $score2\n";
#}


#Denver  (13-3-0) «  0   14  2   7   23
#San Diego (9-7-0)   0   7   0   0   7


while (<>)
{
    next unless /Final   1   2   3   4/;
    $_ = <>;
    my ($team1, $score1) = /([^\(]+[a-zA-Z]) +\(.+[  ]([0-9]+)/;
    $_ = <>;
    my ($team2, $score2) = /([^\(]+[a-zA-Z]) +\(.+[  ]([0-9]+)/;

#    my ($team2, $dummy1, $dummy2, $score2) = /([^«   ]*) *\([0-9]*-[0-9]*-[0-9]*\)( «)? ([0-9]+ +){4}([0-9]*)/;
    print "$team1: $score1 -- $team2: $score2\n";
}
