
def       __lowerCAmelCase      (						A       ,     A    ):

	# Check if the input is valid
	if not len(A    ) == len(A    ) == 3:
		raise ValueError("Please enter a valid equation."    )
	if equationa[0] == equationa[1] == equationa[0] == equationa[1] == 0:
		raise ValueError("Both a & b of two equations can't be zero."    )

	# Extract the coefficients
	UpperCAmelCase_				,   UpperCAmelCase_				,   UpperCAmelCase_       				=			equationa
	UpperCAmelCase_				,   UpperCAmelCase_				,   UpperCAmelCase_       				=			equationa

	# Calculate the determinants of the matrices
	UpperCAmelCase_       				=			aa * ba - aa * ba
	UpperCAmelCase_       				=			ca * ba - ca * ba
	UpperCAmelCase_       				=			aa * ca - aa * ca

	# Check if the system of linear equations has a solution (using Cramer's rule)
	if determinant == 0:
		if determinant_x == determinant_y == 0:
			raise ValueError("Infinite solutions. (Consistent system)"    )
		else:
			raise ValueError("No solution. (Inconsistent system)"    )
	else:
		if determinant_x == determinant_y == 0:
			# Trivial solution (Inconsistent system)
			return (0.0, 0.0)
		else:
			UpperCAmelCase_       				=			determinant_x / determinant
			UpperCAmelCase_       				=			determinant_y / determinant
			# Non-Trivial Solution (Consistent system)
			return (x, y)


from __future__ import annotations

class 						__UpperCamelCase    :




	def __init__(		self	:						Optional[Any]		,	lowerCAmelCase	:						str		,	lowerCAmelCase	:						str							):


		'''simple docstring'''







		UpperCAmelCase_				,   UpperCAmelCase_       				=			text, pattern
		UpperCAmelCase_				,   UpperCAmelCase_       				=			len(lowerCAmelCase							), len(lowerCAmelCase							)




	def       __A					(		self	:						List[str]		,	lowerCAmelCase	:						str							):


		'''simple docstring'''







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




	def       __A					(		self	:						int		,	lowerCAmelCase	:						int							):


		'''simple docstring'''







		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       __A					(		self	:						str							):


		'''simple docstring'''







		UpperCAmelCase_       				=			[]
		for i in range(self.textLen - self.patLen + 1							):
			UpperCAmelCase_       				=			self.mismatch_in_text(lowerCAmelCase							)
			if mismatch_index == -1:
				positions.append(lowerCAmelCase							)
			else:
				UpperCAmelCase_       				=			self.match_in_pattern(self.text[mismatch_index]							)
				UpperCAmelCase_       				=			(
				    mismatch_index - match_index
				)  # shifting index lgtm [py/multiple-definition]
		return positions


_a:    Dict 							=			"""ABAABA"""
_a:    Union[str, Any] 							=			"""AB"""
_a:    str 							=			BoyerMooreSearch(text, pattern)
_a:    Dict 							=			bms.bad_character_heuristic()

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