


'''simple docstring'''






__UpperCAmelCase    				=							{
    0: """underwear""",
    1: """pants""",
    2: """belt""",
    3: """suit""",
    4: """shoe""",
    5: """socks""",
    6: """shirt""",
    7: """tie""",
    8: """watch""",
}

__UpperCAmelCase    				=							[[1, 4], [2, 4], [3], [], [], [4], [2, 7], [3], []]

__UpperCAmelCase    				=							[0 for x in range(len(graph))]
__UpperCAmelCase    				=							[]


def 					_snake_case   (     A ,    A       )						->    Union[str, Any]:
							lowerCAmelCase__          =	1
							while stack:
														lowerCAmelCase__          =	stack.pop()
														print(A ,    clothes[current_clothing]       )
														order += 1


def 					_snake_case   (     A ,    A ,    A       )						->    str:
							lowerCAmelCase__          =	1
							for v in graph[u]:
														if not visited[v]:
																					depth_first_search(A ,    A ,    A       )

							stack.append(A       )


def 					_snake_case   (     A ,    A       )						->    List[Any]:
							for v in range(len(A       )       ):
														if not visited[v]:
																					depth_first_search(A ,    A ,    A       )


if __name__ == "__main__":
		topological_sort(graph, visited)
		print(stack)
		print_stack(stack, clothes)

def 				A__    (  lowerCamelCase  )     ->		Optional[Any]:
				UpperCamelCase_:							Optional[int]		=  len(lowerCamelCase  )
				for _ in range(
				    0   ,			int(((no_of_elements - 1) / 2) + 1  )  ):  # we don't need to traverse to end of list as
								for j in range(0   ,			no_of_elements - 1  ):
												if (
												    lst[j + 1] < lst[j]
												):  # applying bubble sort algorithm from left to right (or forwards)
																UpperCamelCase_:							str		=  lst[j + 1]
																UpperCamelCase_:							Tuple		=  lst[j]
																UpperCamelCase_:							str		=  temp
												if (
												    lst[no_of_elements - 1 - j] < lst[no_of_elements - 2 - j]
												):  # applying bubble sort algorithm from right to left (or backwards)
																UpperCamelCase_:							Union[str, Any]		=  lst[no_of_elements - 1 - j]
																UpperCamelCase_:							Dict		=  lst[no_of_elements - 2 - j]
																UpperCamelCase_:							List[Any]		=  temp
				return lst


if __name__ == "__main__":
							print("""enter the list to be sorted""")
							lowerCamelCase_  :       Union[str, Any]					      =     [int(x) for x in input().split()]  # inputing elements of the list in one line
							lowerCamelCase_  :       Union[str, Any]					      =     double_sort(lst)
							print("""the sorted list is""")
							print(sorted_lst)






