uses crt;
const bk=['A'..'Z','a'..'z','А'..'я','Ё','ё'];
var s:string;
i:byte;
begin
write('Введите слово: ');
read(s);
for i:=length(s) downto 1 do
if s[i] in bk then insert(s[i],s,i);
write(s)
end.
uses crt;
const bk=['A'..'Z','a'..'z','А'..'я','Ё','ё'];
var s:string;
i:byte;
begin
write('Введите слово: ');
read(s);
for i:=length(s) downto 1 do
if s[i] in bk then insert(s[i],s,i);
write(s)
end.