<>?@$_=sort{$a-$b}glob<>:${$4[++$#$_]=0while($m)=grep$_>$m,@{$|--};$|=1}for 0..3;print~~@4