#!/usr/bin/perl

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

for my $a (qw(red blk blu)) {
  for my $b (qw(red blk blu)) {
    for my $c (qw(red blk blu)) {
      for my $d (qw(red blk blu)) {
        my $abb = join "", map $abbr{$_}, $a, $b, $c, $d;
        system "perl ./mcmahon.pl $a $b $c $d | cjpeg -quality 95 > mc$abb.jpg";
        print qq{<img src="mc$abb.jpg">\n};
      }
    }
  }
}
