var
s,n:string;
i,j:integer;
begin
read(s);
writeln;
for i:=1 to length(s) do
if s[i]='a' then inc(j,2);
setlength(n,length(s)+j);
j:=0;
for i:=1 to length(s) do
begin
inc(j);
if s[i]<>'a' then n[j]:=s[i] else
begin
n[j]:=' ';
inc(j);
n[j]:='a';
inc(j);
n[j]:=' ';
end;
end;
writeln(n);
end.