program sapte; var i:integer; n,a:string[15]; f:text; begin assign(f,'out.txt'); rewrite(f); close(f); write('cuvantul este '); readln(n); append(f); writeln(f,n); a:=n; for i:=1 to length(a) do write(f, copy(a,1,i),' '); writeln(f); a:=n; for i:=1 to length(a) do write(f, copy(a,length(a)-i+1,i),' '); close(f); end.