program bits; uses crt; {Evan Liang 2/1/2012 Jr5 Enloe Lyerly Contest #2: Bits} var i,j,k,c1,c2:integer; inp,temp,alpha:string; begin clrscr; alpha:='01'; for i:=1 to 5 do begin writeln('Enter input ',i,': '); readln(inp); temp:=inp; j:=pos('*',temp); delete(temp,j,1); k:=pos('*',temp); if j = 0 then writeln(inp); if (k<>0) and (j<>0) then begin k:=k+1; for c1:=1 to 2 do begin for c2:=1 to 2 do begin temp:=inp; delete(temp,j,1); delete(temp,k-1,1); insert(alpha[c1],temp,j); insert(alpha[c2],temp,k); writeln(temp); end; end; end else if j<>0 then begin for c1:=1 to 2 do begin temp:=inp; delete(temp,j,1); insert(alpha[c1],temp,j); writeln(temp); end; end; end; readln; end.