($n,$s)=glob<>; $s<$_||($s-=$_,@a=($_,@a))for reverse 1..$n; print@a."\n@a";