#!perl -l while($l=$ARGV[2]-length($s)){$d=$ARGV[($e++)%2];push@l,split//,"$d"x($l[0]||$d) ;$n=shift@l||$d;$s.="$d"x($n>$l?$l:$n)}print$s