sub tree { ($h,$f,$s)=@_; split//,'0@*+'x(10*$f).'='x(40*(1-$f)); for(0..$h-1){ $s.=$/.$"x($h-$_); $s.=$_[rand@_]for+0..2*$_ } $s=~s/\S/*/; print$s }