var t: array [1..100] of string; p, s, r: string; f, i, j, k: integer;
begin p := ' ,.!?;:-'; readln(s); k := 0; r := ''; for i := 1 to length(s) do begin f := 0; for j := 1 to length(p) do if s[i] = p[j] then f := 1; if f = 0 then r := r + s[i] else begin k := k + 1; t[k] := r; r := ''; end; if i=length(s) then begin k := k + 1; t[k] := r; end; end; for i := k downto 1 do write(t[i], ' '); end.
1)
var
s,r:string;
i:integer;
begin
readln(s);
r:='';
for i:=1 to length(s) do
if s[i]<>'a' then r:=r+s[i];
writeln(r);
end.
2)
текст разделяем знаками препринания
var
t: array [1..100] of string;
p, s, r: string;
f, i, j, k: integer;
begin
p := ' ,.!?;:-';
readln(s);
k := 0;
r := '';
for i := 1 to length(s) do
begin
f := 0;
for j := 1 to length(p) do
if s[i] = p[j] then f := 1;
if f = 0 then r := r + s[i]
else
begin
k := k + 1;
t[k] := r;
r := '';
end;
if i=length(s) then
begin
k := k + 1;
t[k] := r;
end;
end;
for i := k downto 1 do
write(t[i], ' ');
end.