"""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  lowerCAmelCase_      (_SCREAMING_SNAKE_CASE	:Union[str, Any]		,			_SCREAMING_SNAKE_CASE	:int  )				-> Dict:
						a_							:			Any     		=					1
						while stack:
												a_							:			Dict     		=					stack.pop()
												print(_SCREAMING_SNAKE_CASE		,			clothes[current_clothing]  )
												order += 1

def  lowerCAmelCase_      (_SCREAMING_SNAKE_CASE	:Tuple		,			_SCREAMING_SNAKE_CASE	:Union[str, Any]		,			_SCREAMING_SNAKE_CASE	:Optional[Any]  )				-> Optional[int]:
						a_							:			List[str]     		=					1
						for v in graph[u]:
												if not visited[v]:
																		depth_first_search(_SCREAMING_SNAKE_CASE		,			_SCREAMING_SNAKE_CASE		,			_SCREAMING_SNAKE_CASE  )

						stack.append(_SCREAMING_SNAKE_CASE  )

def  lowerCAmelCase_      (_SCREAMING_SNAKE_CASE	:Optional[Any]		,			_SCREAMING_SNAKE_CASE	:str  )				-> Any:
						for v in range(len(_SCREAMING_SNAKE_CASE  )  ):
												if not visited[v]:
																		depth_first_search(_SCREAMING_SNAKE_CASE		,			_SCREAMING_SNAKE_CASE		,			_SCREAMING_SNAKE_CASE  )


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





"""simple docstring"""






def  lowerCAmelCase_      (_SCREAMING_SNAKE_CASE	:int  )				-> Optional[int]:
						a_							:			List[Any]     		=					len(_SCREAMING_SNAKE_CASE  )
						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)
																								a_							:			List[str]     		=					lst[j + 1]
																								a_							:			Optional[Any]     		=					lst[j]
																								a_							:			Optional[Any]     		=					temp
																		if (
																		    lst[no_of_elements - 1 - j] < lst[no_of_elements - 2 - j]
																		):  # applying bubble sort algorithm from right to left (or backwards)
																								a_							:			Dict     		=					lst[no_of_elements - 1 - j]
																								a_							:			Dict     		=					lst[no_of_elements - 2 - j]
																								a_							:			Any     		=					temp
						return lst


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




