




from __future__ import annotations

def    UpperCAmelCase_				( __UpperCAmelCase		:      list				)   ->					list:
      if len(__UpperCAmelCase				) == 0:
            return []
      SCREAMING_SNAKE_CASE_		,					SCREAMING_SNAKE_CASE_      		=     min(__UpperCAmelCase				), max(__UpperCAmelCase				)
      SCREAMING_SNAKE_CASE_      		=     int(max_value - min_value				) + 1
      SCREAMING_SNAKE_CASE_      		=     [[] for _ in range(__UpperCAmelCase				)]

      for i in my_list:
            buckets[int(i - min_value				)].append(__UpperCAmelCase				)

      return [v for bucket in buckets for v in sorted(__UpperCAmelCase				)]


if __name__ == "__main__":
   from doctest import testmod

   testmod()
   assert bucket_sort([4, 5, 3, 2, 1]) == [1, 2, 3, 4, 5]
   assert bucket_sort([0, 1, -10, 15, 2, -2]) == [-10, -2, 0, 1, 2, 15]





class 			lowerCamelCase_				:


 '''simple docstring'''







 def __init__(				self    :						str		):
       SCREAMING_SNAKE_CASE_      		=     {}



 def  lowerCAmelCase_    (				self    :						List[str]		):
       print(self.vertex		)
       for i in self.vertex:
             print(_lowerCAmelCase							,							' -> '							,							' -> '.join([str(_lowerCAmelCase		) for j in self.vertex[i]]		)		)



 def  lowerCAmelCase_    (				self    :						Union[str, Any]							,							_lowerCAmelCase    :						int							,							_lowerCAmelCase    :						int		):
       # check if vertex is already present,
       if from_vertex in self.vertex:
             self.vertex[from_vertex].append(_lowerCAmelCase		)
       else:
             # else make a new vertex
             SCREAMING_SNAKE_CASE_      		=     [to_vertex]



 def  lowerCAmelCase_    (				self    :						Optional[Any]		):
       # visited array for storing already visited nodes
       SCREAMING_SNAKE_CASE_      		=     [False] * len(self.vertex		)

       # call the recursive helper function
       for i in range(len(self.vertex		)		):
             if not visited[i]:
                   self.dfs_recursive(_lowerCAmelCase							,							_lowerCAmelCase		)




 def  lowerCAmelCase_    (				self    :						Tuple							,							_lowerCAmelCase    :						int							,							_lowerCAmelCase    :						list		):
       # mark start vertex as visited
       SCREAMING_SNAKE_CASE_      		=     True

       print(_lowerCAmelCase							,							end=' '		)

       # Recur for all the vertices that are adjacent to this node
       for i in self.vertex:
             if not visited[i]:
                   self.dfs_recursive(_lowerCAmelCase							,							_lowerCAmelCase		)


if __name__ == "__main__":
   lowerCamelCase__					:  List[Any]      							=				Graph()
   g.add_edge(0, 1)
   g.add_edge(0, 2)
   g.add_edge(1, 2)
   g.add_edge(2, 0)
   g.add_edge(2, 3)
   g.add_edge(3, 3)

   g.print_graph()
   print('DFS:')
   g.dfs()

   # OUTPUT:
   # 0  ->  1 -> 2
   # 1  ->  2
   # 2  ->  0 -> 3
   # 3  ->  3
   # DFS:
   #  0 1 2 3