($n,$m,$k)=glob<>;map{splice@a,$-=@a-$k,0,$_.$/;$k-=$_}0..--$n-1,$m-$n*($n-1)/2;print@a