


from __future__ import annotations

from collections.abc import Generator

def 						_UpperCAmelCase    (      ):
     __UpperCamelCase   							={}
     __UpperCamelCase   							=2
     while True:
          __UpperCamelCase   							=factor_map.pop(SCREAMING_SNAKE_CASE__      ,					SCREAMING_SNAKE_CASE__    )
          if factor:
               __UpperCamelCase   							=factor + prime
               while x in factor_map:
                    x += factor
               __UpperCamelCase   							=factor
          else:
               __UpperCamelCase   							=prime
               yield prime
          prime += 1

def 						_UpperCAmelCase    (      SCREAMING_SNAKE_CASE__      : float = 1E10    ):
     __UpperCamelCase   							=sieve()

     __UpperCamelCase   							=1
     while True:
          __UpperCamelCase   							=next(SCREAMING_SNAKE_CASE__    )
          if (2 * prime * n) > limit:
               return n
          # Ignore the next prime as the reminder will be 2.
          next(SCREAMING_SNAKE_CASE__    )
          n += 2


if __name__ == "__main__":
   print(solution())









from __future__ import annotations

from typing import Any

def 						_UpperCAmelCase    (      SCREAMING_SNAKE_CASE__      : list[Any]    ):
     create_state_space_tree(SCREAMING_SNAKE_CASE__      ,					[]      ,					0    )

def 						_UpperCAmelCase    (      SCREAMING_SNAKE_CASE__      : list[Any]      ,					SCREAMING_SNAKE_CASE__      : list[Any]      ,					SCREAMING_SNAKE_CASE__      : int    ):

     if index == len(SCREAMING_SNAKE_CASE__    ):
          print(SCREAMING_SNAKE_CASE__    )
          return

     create_state_space_tree(SCREAMING_SNAKE_CASE__      ,					SCREAMING_SNAKE_CASE__      ,					index + 1    )
     current_subsequence.append(sequence[index]    )
     create_state_space_tree(SCREAMING_SNAKE_CASE__      ,					SCREAMING_SNAKE_CASE__      ,					index + 1    )
     current_subsequence.pop()


if __name__ == "__main__":
   _A			=						[3, 1, 2, 4]
   generate_all_subsequences(seq)

   seq.clear()
   seq.extend(['A', 'B', 'C'])
   generate_all_subsequences(seq)





