#!/n/gnu/bin/perl -w

$jogador = $ARGV[0];

$count = 0;

while (<STDIN>) {
  /(ra\d\d\d\d\d\d) versus (ra\d\d\d\d\d\d)/ && do {
    $jog{"x"} = $1;
    $jog{"o"} = $2;
    next;
  };

  /^\[(\w)\w*, ([xo])/ && do {
    if (($1 eq "v") && ($jog{$2} eq {
      $count
