Var i,j: integer; chislo: string; begin chislo:='12323'; for j:=1 to 14 do begin i:=1; while i<=length(chislo) do begin if copy(chislo,i,1)='1' then begin delete(chislo,i,1);insert('33',chislo,i); inc(i); end; inc(i); end; i:=1; while i<=length(chislo) do begin if copy(chislo,i,1)='2' then begin delete(chislo,i,1);insert('1',chislo,i); end; inc(i); end; i:=1; while i<=length(chislo) do begin if copy(chislo,i,1)='3' then begin delete(chislo,i,1);insert('2',chislo,i); end; inc(i); end; end; Writeln(chislo); readln; end.