($N,$D,$K)=glob<>; $D-=(@_=('',1..$K))*$#_/2; print$D<0|eval(join'+',$N-$K+1..$N)<$D?-1:"@{$N-++$_[$K]or--$N,$K--while$D--;_}"