#!/usr/bin/perl

my $N = "00";
my %abbr = ('blu' => 'B', 
            'red' => 'R',
            'blk' => 'K',
            'wht' => 'W',
            'grn' => 'G',
           );

while (<>) {
  chomp;
  next unless /\S/;
  my @abb = my @col = split;
  for (@abb) { $_ = $abbr{$_} or die }
  my $abb = join "", @abb;
  system "perl ./mcmahon.pl $_ | cjpeg -q 100 > mc$abb.jpg";
  print qq{<img src="mc$abb.jpg">\n};
  $N++;
}
