






"""simple docstring"""



def      _lowerCAmelCase		(							UpperCAmelCase__       :					int,						UpperCAmelCase__       :					int      )		->int:
						return abs(UpperCAmelCase__      ) if a == 0 else greatest_common_divisor(b % a,						UpperCAmelCase__      )




def      _lowerCAmelCase		(							UpperCAmelCase__       :					int,						UpperCAmelCase__       :					int      )		->int:
						while y:  # --> when y=0 then loop will terminate and return x as final GCD.
												A__						:  Union[str, Any]		  =  y, x % y
						return abs(UpperCAmelCase__      )




def      _lowerCAmelCase		(							)		->int:
						try:
												A__						:  str		  =  input("""Enter two integers separated by comma (,): """      ).split(""","""      )
												A__						:  Dict		  =  int(nums[0]      )
												A__						:  Union[str, Any]		  =  int(nums[1]      )
												print(
												    f'greatest_common_divisor({num_a}, {num_a}) = '
												    f'{greatest_common_divisor(UpperCAmelCase__,						UpperCAmelCase__      )}'      )
												print(f'By iterative gcd({num_a}, {num_a}) = {gcd_by_iterative(UpperCAmelCase__,						UpperCAmelCase__      )}'      )
						except (IndexError, UnboundLocalError, ValueError):
												print("""Wrong input"""      )


if __name__ == "__main__":
						main()














"""simple docstring"""



from __future__ import annotations






class 							__SCREAMING_SNAKE_CASE						:


							def __init__(			self      :						Any			,    snake_case      :						str			,    snake_case      :						str							):
													'''simple docstring'''





													A__  ,  A__						:  List[str]		  =  text, pattern
													A__  ,  A__						:  List[str]		  =  len(snake_case							), len(snake_case							)


							def 						_UpperCamelCase       (			self      :						str			,    snake_case      :						str							):
													'''simple docstring'''





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


							def 						_UpperCamelCase       (			self      :						Any			,    snake_case      :						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 						_UpperCamelCase       (			self      :						Union[str, Any]							):
													'''simple docstring'''





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




A_    =							'''ABAABA'''
A_    =							'''AB'''
A_    =							BoyerMooreSearch(text, pattern)
A_    =							bms.bad_character_heuristic()

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






