



import functools





def      __snake_case	(			_UpperCAmelCase   , _UpperCAmelCase				):
    __a						       =				len(_UpperCAmelCase				)
    __a						       =				len(_UpperCAmelCase				)

    @functools.cache
    def min_distance(_UpperCAmelCase   , _UpperCAmelCase				) -> int:
        # if first word index is overflow - delete all from the second word
        if indexa >= len_worda:
            return len_worda - indexa
        # if second word index is overflow - delete all from the first word
        if indexa >= len_worda:
            return len_worda - indexa
        __a						       =				int(worda[indexa] != worda[indexa]				)  # current letters not identical
        return min(
            1 + min_distance(indexa + 1   , _UpperCAmelCase				)   , 1 + min_distance(_UpperCAmelCase   , indexa + 1				)   , diff + min_distance(indexa + 1   , indexa + 1				)   , )

    return min_distance(0   , 0				)


if __name__ == "__main__":
 import doctest

 doctest.testmod()







'''simple docstring'''







def 					snake_case_		(				__SCREAMING_SNAKE_CASE					: str      ,      __SCREAMING_SNAKE_CASE					: str							):



						"""simple docstring"""





						lowercase_	:     List[str]													=       len(__SCREAMING_SNAKE_CASE							)
						lowercase_	:     Optional[int]													=       []
						for i in range(len(__SCREAMING_SNAKE_CASE							) - pat_len + 1							):
												lowercase_	:     Tuple													=       True
												for j in range(__SCREAMING_SNAKE_CASE							):
																		if s[i + j] != pattern[j]:
																								lowercase_	:     List[str]													=       False
																								break
												if match_found:
																		position.append(__SCREAMING_SNAKE_CASE							)
						return position


if __name__ == "__main__":
							assert naive_pattern_search("ABCDEFG", "DE") == [3]
							print(naive_pattern_search("ABAAABCDBBABCDDEBCABC", "ABC"))



