var s : string[255]; i : integer; begin writeln('Введите строку.'); readln(s); s := ' ' + s; {добавляем в начало пробел} i := 1; if length(s) > 1 then repeat if s[i] = ' ' then if s[i+1] = ' ' then begin delete(s, i+1, 1); i := i - 1; end; inc(i); until i = length(s); i := 2; while i <= length(s) do begin if (s[i] = 'a') and (s[i-1] = ' ') then begin while (s[i] <> ' ') and (i <= length(s)) do begin write(s[i]); inc(i); end; writeln; end; inc(i); readln; end.