program Bevarde2;
const n=100;
type masyvas=array[1..n] of string;
var mas:masyvas;
i:integer;
k:boolean;
x:integer;
simbolis:string;
function funkcija(p:string):string;
var poz,moz,koz:integer;
begin
begin
poz:=0; moz:=0; koz:=0;
poz:=pos('ch',p);
if poz>0 then
Delete(p,poz,2);
if poz>0 then
Insert('cie',p,poz);
funkcija:=p;
{-------}
koz:=pos('sh',p);
if koz>0 then
Delete(p,koz,2);
if koz>0 then
Insert('sie',p,koz);
end;
funkcija:=p;
{---------}
moz:=pos('zh',p);
if moz>0 then
Delete(p,moz,2);
if moz>0 then
Insert('zie',p,moz);
funkcija:=p;
end;
begin
writeLn('parasykit simboli, kuri parasius nebebus nuskaitinejamos zodziu eilutes');
readLn(simbolis);
k:= true;
i:=1;
begin
while k= true do
begin
writeLn('iveskite ',i,'aji zodi/sakini');
readLn(mas[i]);
if (mas[i] = simbolis) then k:=false
else i:=i+1;
end;
end;
i:=i-1;
for x:=1 to i do
begin
writeLn(funkcija(mas[x]));
end;
readLn;
end.