





import random





def     _UpperCamelCase     (a__   :int   ,			a__   :float   ,			a__   :bool = False       ):






							"""simple docstring"""





							UpperCamelCase__				     =			{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__   :int       ):






							"""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()











from typing import Any





def     _UpperCamelCase     (a__   :list       ):






							"""simple docstring"""





							if not input_list:
														return []
							UpperCamelCase__				     =			[input_list.count(a__       ) for value in input_list]
							UpperCamelCase__				     =			max(a__       )  # Gets the maximum count in the input list.
							# Gets values of modes
							return sorted({input_list[i] for i, value in enumerate(a__       ) if value == y}       )


if __name__ == "__main__":
					import doctest

					doctest.testmod()




