uses crt; label again; var st1:string; st:array[0..20]of string; i,z,count,min,min_pos:integer; function get_count(const s:string):byte; var i,kolv:byte; begin kolv:=0; for i:=1 to length(s) do if upcase(s[i])in ['A'..'Z'] then inc(kolv); get_count:=kolv; end; begin clrscr; writeln('vasha stroka - '); readln(st1); st1:='ffggg****ffggg******ffggg*hhjjj****kl'; writeln(st1); writeln; {---------------------------------} z:=-1; again: count:=0; for i:=1 to length(st1) do if st1[i]='*' then begin count:=count+1; if (st1[i+1]<>'*')or(i=length(st1)) then begin if count>3 then begin z:=z+1; st[z]:=copy(st1,1,i-count); delete(st1,1,i); goto again; end else count:=0; end; end; if st1<>'' then begin z:=z+1; st[z]:=st1; end; {-----------------------------------------} min:=get_count(st[0]); min_pos:=0; for z:=0 to 20 do if st[z]<>''then if get_count(st[z])'' then writeln(st[z]);; end; readln; end. end.