program suggest; const n : integer = 0; type str = string[69]; CLRSCR = STRING[26]; var i : integer; list : packed array[1..551] of str; s : str; fd : text; begin CLRSCR; assign(fd, 'SUGGEST.D'); {$I-} reset(fd); {$I+} if ioresult <> 0 then begin writeln; writeln; writeln; writeln('can''t open SUGGEST.D'); halt end; while (not eof(fd)) and (n <= 551) do begin n := succ(n); readln(fd, list[n]) end; close(fd); while true do begin writeln; write('Phrase: '); {$I-} readln(s); {$I+} if (ioresult <> 0) or (length(s) = 0) then halt; for i := 1 to n do if pos(s,list[i]) in [1..pos('|',list[i])] then writeln('use "', copy(list[i],succ(pos('|',list[i])),128), '" for "', copy(list[i],1,pred(pos('|',list[i]))), '"'); end; end.