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