var s:string;
i,m:byte;
a:array [1..1000] of string;
begin
write('Nhap xau: '); readln(s);
for i:=2 to n do
if s[i-1]=#32 then
inc(m)
else
if s[i]<>#32 then a[m]:=a[m]+s[i];
writeln('Xau nguoc la: ');
for i:=m downto 1 do
write(a[i],' ');
readln
end.