"""simple docstring"""







def      __lowerCAmelCase(		__UpperCAmelCase     ,__UpperCAmelCase			):






	"""simple docstring"""





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


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




"""simple docstring"""







def      __lowerCAmelCase(		__UpperCAmelCase     ,__UpperCAmelCase			):






	"""simple docstring"""





	_lowercase :    Any							=							len(__UpperCAmelCase			)
	_lowercase :    Any							=							len(__UpperCAmelCase			)
	_lowercase :    List[Any]							=							[[False for _ in range(m + 1			)] for _ in range(n + 1			)]
	_lowercase :    Union[str, Any]							=							True
	for i in range(__UpperCAmelCase			):
		for j in range(m + 1			):
			if dp[i][j]:
				if j < m and a[i].upper() == b[j]:
					_lowercase :    Optional[int]							=							True
				if a[i].islower():
					_lowercase :    Union[str, Any]							=							True
	return dp[n][m]


if __name__ == "__main__":
						import doctest

						doctest.testmod()



