n,d,K,*x=$<.read.split.map &:to_i m=[0,0,0] c=h=x[0] n.times{|j|a,f=x[j],[j+d,n-1].min a>c&&x[f]m[0]&&m=[v,j,k]} c,h=a,f)} puts m[0]<1?0:[m.shift*K,m*' ']