1.
var s,s1:string;
i:integer;
begin
readln(s);
s1:=s;
for i:=1 to length(s1) do begin
if s1[i]='а' then s1[i]:='б' else
if s1[i]='А' then s1[i]:='Б' else
if s1[i]='б' then s1[i]:='а' else
if s1[i]='Б' then s1[i]:='А';
end;
writeln(s1);end.
2.
var s,s1:string;
i,k:integer;
begin
readln(s);
s1:=s; i:=1; k:=1;
while pos(' ',s1)>0 do begin
delete(s1,1,pos(' ',s1));
k:=k+1;
end;
writeln(k);
end.
3.
var s,famil,s1,imya,otch:string;
i:integer;
begin
readln(s);
famil:=copy(s,1,pos(' ',s)-1);
delete(s,1,pos(' ',s));
imya:=copy(s,1,1);
delete(s,1,pos(' ',s));
otch:=copy(s,1,1);
s1:=concat(imya,'.',' ',otch,'.',' ',famil);
writeln(s1); end.