




'''simple docstring'''





import random


def      UpperCamelCase_(	snake_case							:       List[Any]							,				snake_case							:       Optional[Any]     ):

							'''simple docstring'''






							snake_case_						=      [], [], []
							for element in data:
														if element < pivot:
																					less.append(_SCREAMING_SNAKE_CASE     )
														elif element > pivot:
																					greater.append(_SCREAMING_SNAKE_CASE     )
														else:
																					equal.append(_SCREAMING_SNAKE_CASE     )
							return less, equal, greater




def      UpperCamelCase_(	snake_case							:       Tuple							,				snake_case							:       Union[str, Any]     ):

							'''simple docstring'''






							if index >= len(_SCREAMING_SNAKE_CASE     ) or index < 0:
														return None

							snake_case_						=      items[random.randint(0							,				len(_SCREAMING_SNAKE_CASE     ) - 1     )]
							snake_case_						=      0
							snake_case_						=      _partition(_SCREAMING_SNAKE_CASE							,				_SCREAMING_SNAKE_CASE     )
							snake_case_						=      len(_SCREAMING_SNAKE_CASE     )
							snake_case_						=      len(_SCREAMING_SNAKE_CASE     )

							# index is the pivot
							if m <= index < m + count:
														return pivot
							# must be in smaller
							elif m > index:
														return quick_select(_SCREAMING_SNAKE_CASE							,				_SCREAMING_SNAKE_CASE     )
							# must be in larger
							else:
														return quick_select(_SCREAMING_SNAKE_CASE							,				index - (m + count)     )










def      A      (      _SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE    )	-> list:
       lowerCamelCase   :      Dict			 =					len(_SCREAMING_SNAKE_CASE    )
       lowerCamelCase   :      Union[str, Any]			 =					[]
       for i in range(len(_SCREAMING_SNAKE_CASE    ) - pat_len + 1    ):
              lowerCamelCase   :      Dict			 =					True
              for j in range(_SCREAMING_SNAKE_CASE    ):
                     if s[i + j] != pattern[j]:
                            lowerCamelCase   :      Optional[int]			 =					False
                            break
              if match_found:
                     position.append(_SCREAMING_SNAKE_CASE    )
       return position


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






