'''simple docstring'''

import random



def 							UpperCamelCase__			(			a__			,      a__			,      a__ = False      ):


						'''simple docstring'''






						_lowerCAmelCase										={i: [] for i in range(a__      )}

						# if probability is greater or equal than 1, then generate a complete graph
						if probability >= 1:
												return complete_graph(a__      )
						# if probability is lower or equal than 0, then return a graph without edges
						if probability <= 0:
												return graph

						# for each couple of nodes, add an edge from u to v
						# if the number randomly generated is greater than probability probability
						for i in range(a__      ):
												for j in range(i + 1			,      a__      ):
																		if random.random() < probability:
																								graph[i].append(a__      )
																								if not directed:
																														# if the graph is undirected, add an edge in from j to i, either
																														graph[j].append(a__      )
						return graph



def 							UpperCamelCase__			(			a__      ):


						'''simple docstring'''






						return {
						    i: [j for j in range(a__      ) if i != j] for i in range(a__      )
						}


if __name__ == "__main__":
							import doctest

							doctest.testmod()






'''simple docstring'''

from __future__ import annotations

lowercase_     		= 10



def 							UpperCamelCase__			(			a__      ):


						'''simple docstring'''






						_lowerCAmelCase										=1
						_lowerCAmelCase										=max(a__      )
						while placement <= max_digit:
												# declare and initialize empty buckets
												_lowerCAmelCase										=[[] for _ in range(a__      )]
												# split list_of_ints between the buckets
												for i in list_of_ints:
																		_lowerCAmelCase										=int((i / placement) % RADIX      )
																		buckets[tmp].append(a__      )
												# put each buckets' contents into list_of_ints
												_lowerCAmelCase										=0
												for b in range(a__      ):
																		for i in buckets[b]:
																								_lowerCAmelCase										=i
																								a += 1
        # move to next
												placement *= RADIX
						return list_of_ints


if __name__ == "__main__":
							import doctest

							doctest.testmod()





