



'''simple docstring'''



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


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









'''simple docstring'''



def 							__UpperCAmelCase				(				UpperCamelCase__				:int   ,				UpperCamelCase__				:list			)		->						list:
				snake_case__      :   List[str]      =    sorted(UpperCamelCase__   ,				key=lambda UpperCamelCase__			: value[2]   ,				reverse=UpperCamelCase__			)

				# Create a list of size equal to the maximum deadline
				# and initialize it with -1
				snake_case__      :   Any      =    max(UpperCamelCase__   ,				key=lambda UpperCamelCase__			: value[1]			)[1]
				snake_case__      :   str      =    [-1] * max_deadline

				# Finding the maximum profit and the count of jobs
				snake_case__      :   List[str]      =    0
				snake_case__      :   Optional[Any]      =    0
				for job in jobs:
								# Find a free time slot for this job
								# (Note that we start from the last possible slot)
								for i in range(job[1] - 1   ,				-1   ,				-1			):
												if time_slots[i] == -1:
																snake_case__      :   Optional[Any]      =    job[0]
																count += 1
																max_profit += job[2]
																break
				return [count, max_profit]


if __name__ == "__main__":
				import doctest

				doctest.testmod()




