
from __future__ import annotations




def       _SCREAMING_SNAKE_CASE   (						_lowerCamelCase					:     list[int]		,    _lowerCamelCase					:     int		,    _lowerCamelCase					:     int		,    _lowerCamelCase					:     int)   ->       None:






							'''simple docstring'''





							if (direction == 1 and array[indexa] > array[indexa]) or (
							    direction == 0 and array[indexa] < array[indexa]
							):
														__UpperCamelCase  ,		__UpperCamelCase      :  int       =   array[indexa], array[indexa]




def       _SCREAMING_SNAKE_CASE   (						_lowerCamelCase					:     list[int]		,    _lowerCamelCase					:     int		,    _lowerCamelCase					:     int		,    _lowerCamelCase					:     int)   ->       None:






							'''simple docstring'''





							if length > 1:
														__UpperCamelCase      :  Union[str, Any]       =   int(length / 2)
														for i in range(_lowerCamelCase		,    low + middle):
																					comp_and_swap(_lowerCamelCase		,    _lowerCamelCase		,    i + middle		,    _lowerCamelCase)
														bitonic_merge(_lowerCamelCase		,    _lowerCamelCase		,    _lowerCamelCase		,    _lowerCamelCase)
														bitonic_merge(_lowerCamelCase		,    low + middle		,    _lowerCamelCase		,    _lowerCamelCase)




def       _SCREAMING_SNAKE_CASE   (						_lowerCamelCase					:     list[int]		,    _lowerCamelCase					:     int		,    _lowerCamelCase					:     int		,    _lowerCamelCase					:     int)   ->       None:






							'''simple docstring'''





							if length > 1:
														__UpperCamelCase      :  List[str]       =   int(length / 2)
														bitonic_sort(_lowerCamelCase		,    _lowerCamelCase		,    _lowerCamelCase		,    1)
														bitonic_sort(_lowerCamelCase		,    low + middle		,    _lowerCamelCase		,    0)
														bitonic_merge(_lowerCamelCase		,    _lowerCamelCase		,    _lowerCamelCase		,    _lowerCamelCase)


if __name__ == "__main__":
		lowercase    :   int						=			input('Enter numbers separated by a comma:\n').strip()
		lowercase    :   List[Any]						=			[int(item.strip()) for item in user_input.split(',')]

		bitonic_sort(unsorted, 0, len(unsorted), 1)
		print('\nSorted array in ascending order is: ', end='')
		print(*unsorted, sep=', ')

		bitonic_merge(unsorted, 0, len(unsorted), 0)
		print('Sorted array in descending order is: ', end='')
		print(*unsorted, sep=', ')

from __future__ import annotations




class 					lowerCamelCase__				:




	'''simple docstring'''




	def __init__(   self						:Dict	,  a						:str	,  a						:str		)						->					Union[str, Any]:
								__UpperCamelCase  ,		__UpperCamelCase      :  Optional[int]       =   text, pattern
								__UpperCamelCase  ,		__UpperCamelCase      :  Tuple       =   len(a		), len(a		)







	def   _lowerCamelCase							(   self						:Any	,  a						:str		)						->					int:

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







	def   _lowerCamelCase							(   self						:str	,  a						:int		)						->					int:

								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   _lowerCamelCase							(   self						:Union[str, Any]		)						->					list[int]:
								# searches pattern in text and returns index positions
								__UpperCamelCase      :  Any       =   []
								for i in range(self.textLen - self.patLen + 1		):
															__UpperCamelCase      :  List[Any]       =   self.mismatch_in_text(a		)
															if mismatch_index == -1:
																						positions.append(a		)
															else:
																						__UpperCamelCase      :  Any       =   self.match_in_pattern(self.text[mismatch_index]		)
																						__UpperCamelCase      :  Dict       =   (
																						    mismatch_index - match_index
																						)  # shifting index lgtm [py/multiple-definition]
								return positions
lowercase    :   Any						=			'ABAABA'
lowercase    :   str						=			'AB'
lowercase    :   str						=			BoyerMooreSearch(text, pattern)
lowercase    :   Union[str, Any]						=			bms.bad_character_heuristic()

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