program edit; var i,j,n:integer; g:array[0..1500,0..5]of real; begin for i:=0 to 5 do g[0,i]:=1/6; repeat readln(n); for i:=1 to n do for j:=0 to 5 do case j of 0:g[i,j]:=(g[i-1,0]+g[i-1,1])/6; 1:g[i,j]:=g[i-1,0]*5/6+g[i-1,1]/6+g[i-1,2]/3; 2:g[i,j]:=g[i-1,1]*2/3+g[i-1,2]/6+g[i-1,3]/2; 3:g[i,j]:=g[i-1,2]/2+g[i-1,3]/6+g[i-1,4]*2/3; 4:g[i,j]:=g[i-1,3]/3+g[i-1,4]/6+g[i-1,5]*5/6; 5:g[i,j]:=(g[i-1,4]+g[i-1,5])/6; end; for i:=0 to 5 do write(g[n,i],' '); writeln; until (n>1500)or(n<0); readln; end.