



from __future__ import annotations

class  snake_case__:

					"""simple docstring"""






					def __init__(				self   :      str ,  SCREAMING_SNAKE_CASE   :      str ,  SCREAMING_SNAKE_CASE   :      Optional[Any]	):
									lowercase__				,				lowercase__	:       List[str]						=	text, pattern
									lowercase__				,				lowercase__	:       List[str]						=	len(lowerCAmelCase__	), len(lowerCAmelCase__	)







					def 					snake_case	(				self   :      Optional[Any] ,  SCREAMING_SNAKE_CASE   :      int	):


									for i in range(self.patLen - 1 ,  -1 ,  -1	):
													if char == self.pattern[i]:
																	return i
									return -1







					def 					snake_case	(				self   :      Optional[int] ,  SCREAMING_SNAKE_CASE   :      Union[str, Any]	):


									for i in range(self.patLen - 1 ,  -1 ,  -1	):
													if self.pattern[i] != self.text[current_pos + i]:
																	return current_pos + i
									return -1







					def 					snake_case	(				self   :      List[Any]	):
									lowercase__	:       List[Any]						=	[]
									for i in range(self.textLen - self.patLen + 1	):
													lowercase__	:       Union[str, Any]						=	self.mismatch_in_text(lowerCAmelCase__	)
													if mismatch_index == -1:
																	positions.append(lowerCAmelCase__	)
													else:
																	lowercase__	:       str						=	self.match_in_pattern(self.text[mismatch_index]	)
																	lowercase__	:       List[Any]						=	(
																	    mismatch_index - match_index
																	)  # shifting index lgtm [py/multiple-definition]
									return positions






lowerCAmelCase__	    =    """ABAABA"""
lowerCAmelCase__	    =    """AB"""
lowerCAmelCase__	    =    BoyerMooreSearch(text, pattern)
lowerCAmelCase__	    =    bms.bad_character_heuristic()

if len(positions) == 0:
				print('''No match found''')
else:
				print('''Pattern found in following positions: ''')
				print(positions)





def 							UpperCAmelCase		(       lowercase				,     lowercase				):







				"""simple docstring"""



				__lowercase					     =				len(lowercase				)
				__lowercase					     =				len(lowercase				)
				__lowercase					     =				[[False for _ in range(m + 1				)] for _ in range(n + 1				)]
				__lowercase					     =				True
				for i in range(lowercase				):
								for j in range(m + 1				):
												if dp[i][j]:
																if j < m and a[i].upper() == b[j]:
																				__lowercase					     =				True
																if a[i].islower():
																				__lowercase					     =				True
				return dp[n][m]


if __name__ == "__main__":
		import doctest

		doctest.testmod()