($l) = grep(/\d*$last/,grep(!/\./,values(%params)));

for($i = 0; $i<40; $i++) {
  push(@firsts,$i) if($i % 4 == $l % 4);
}


map { push(@seconds, ($_+2>39)?$_+2-40:$_+2) } (sort{$a <=> $b}@firsts);

foreach $f (@firsts) {
  foreach $s ( sort {$a <=> $b} @seconds) {
    printf("%02d-%02d-%02d      ",$f,$s,$l);
    print "<br>" unless ++$count%4;