





import math






def lowerCamelCase__   (							snake_case_     :  int	)				->    list[int]:
   __snake_case								=       []
   __snake_case								=       2
   __snake_case								=       int(math.sqrt(snake_case_	)	)  # Size of every segment
   __snake_case								=       [True] * (end + 1)
   __snake_case								=       []

   while start <= end:
      if temp[start] is True:
         in_prime.append(snake_case_	)
         for i in range(start * start	,				end + 1	,				snake_case_	):
            __snake_case								=       False
      start += 1
   prime += in_prime

   __snake_case								=       end + 1
   __snake_case								=       min(2 * end	,				snake_case_	)

   while low <= n:
      __snake_case								=       [True] * (high - low + 1)
      for each in in_prime:
         __snake_case								=       math.floor(low / each	) * each
         if t < low:
            t += each

         for j in range(snake_case_	,				high + 1	,				snake_case_	):
            __snake_case								=       False

      for j in range(len(snake_case_	)	):
         if temp[j] is True:
            prime.append(j + low	)

      __snake_case								=       high + 1
      __snake_case								=       min(high + end	,				snake_case_	)

   return prime







print(sieve(10**6))








class 		SCREAMING_SNAKE_CASE__    :


      def __init__(self	:				str    ,      a__	:				list				):





         """simple docstring"""



         __snake_case								=       set_counts
         __snake_case								=       max(a__				)
         __snake_case								=       len(a__				)
         __snake_case								=       [1] * num_sets
         __snake_case								=       list(range(a__				)				)


      def        a			(self	:				str    ,      a__	:				int    ,      a__	:				int				):





         """simple docstring"""



         __snake_case								=       self.get_parent(a__				)
         __snake_case								=       self.get_parent(a__				)

         if src_parent == dst_parent:
            return False

         if self.ranks[dst_parent] >= self.ranks[src_parent]:
            self.set_counts[dst_parent] += self.set_counts[src_parent]
            __snake_case								=       0
            __snake_case								=       dst_parent
            if self.ranks[dst_parent] == self.ranks[src_parent]:
               self.ranks[dst_parent] += 1
            __snake_case								=       self.set_counts[dst_parent]
         else:
            self.set_counts[src_parent] += self.set_counts[dst_parent]
            __snake_case								=       0
            __snake_case								=       src_parent
            __snake_case								=       self.set_counts[src_parent]

         __snake_case								=       max(self.max_set    ,      a__				)
         return True


      def        a			(self	:				Union[str, Any]    ,      a__	:				int				):





         """simple docstring"""



         if self.parents[disj_set] == disj_set:
            return disj_set
         __snake_case								=       self.get_parent(self.parents[disj_set]				)
         return self.parents[disj_set]

