
import random

from .binary_exp_mod import bin_exp_mod




def    __UpperCamelCase     (				lowerCAmelCase__							:				Any  ,   lowerCAmelCase__							:				Tuple=1_0_0_0  ):
 if n < 2:
  return False

 if n % 2 == 0:
  return n == 2

 # this means n is odd
 __a :  Optional[int]						=  n - 1
 __a :  List[str]						=  0
 while d % 2 == 0:
  d /= 2
  exp += 1

 # n - 1=d*(2**exp)
 __a :  Any						=  0
 while count < prec:
  __a :  List[Any]						=  random.randint(2  ,   n - 1  )
  __a :  Optional[int]						=  bin_exp_mod(lowerCAmelCase__  ,   lowerCAmelCase__  ,   lowerCAmelCase__  )
  if b != 1:
   __a :  Optional[int]						=  True
   for _ in range(lowerCAmelCase__  ):
    if b == n - 1:
     __a :  Optional[int]						=  False
     break
    __a :  Optional[int]						=  b * b
    b %= n
   if flag:
    return False
   count += 1
 return True


if __name__ == "__main__":
      lowercase__       =abs(int(input('Enter bound : ').strip()))
      print('Here\'s the list of primes:')
      print(', '.join(str(i) for i in range(n + 1) if is_prime_big(i)))


def    __UpperCamelCase     (				lowerCAmelCase__							:				str  ,   lowerCAmelCase__							:				str  ):
 __a :  str						=  len(lowerCAmelCase__  )
 __a :  Optional[int]						=  []
 for i in range(len(lowerCAmelCase__  ) - pat_len + 1  ):
  __a :  str						=  True
  for j in range(lowerCAmelCase__  ):
   if s[i + j] != pattern[j]:
    __a :  Tuple						=  False
    break
  if match_found:
   position.append(lowerCAmelCase__  )
 return position


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