program balik_kata;
uses crt;
var kalimat:string;
i,jumkar:integer;
begin
writeln('kalimat');
readln(kalimat);
writeln;
writeln('kalimat asli:');writeln(kalimat);
writeln;writeln('setelah dibalik:');
jumkar:=length(kalimat);
for i:=length(kalimat) downto 1 do
begin
write(kalimat[i]);
end;
readln;
end.