


"""simple docstring"""






def 			A__		(					_UpperCAmelCase    :      List[str]	)							->	Any:

	'''simple docstring'''


	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__  :						List[Any]		=      lst[j + 1]
				snake_case__  :						Optional[int]		=      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__  :						Any		=      lst[no_of_elements - 1 - j]
				snake_case__  :						Any		=      lst[no_of_elements - 2 - j]
				snake_case__  :						int		=      temp
	return lst


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











'''simple docstring'''







from __future__ import annotations





def 		snake_case_				(_a      :				list[list[int]]       ,  _a      :				list[list[int]]	):
    assert len(_a	) == len(_a	)

    UpperCAmelCase     			=						len(_a	)
    UpperCAmelCase     			=						list(range(_a	)	)
    UpperCAmelCase     			=						[-1] * n  # who the donor has donated to
    UpperCAmelCase     			=						[-1] * n  # who the recipient has received from
    UpperCAmelCase     			=						[0] * n

    while unmatched_donors:
        UpperCAmelCase     			=						unmatched_donors[0]
        UpperCAmelCase     			=						donor_pref[donor]
        UpperCAmelCase     			=						donor_preference[num_donations[donor]]
        num_donations[donor] += 1
        UpperCAmelCase     			=						recipient_pref[recipient]
        UpperCAmelCase     			=						rec_record[recipient]

        if prev_donor != -1:
            if rec_preference.index(_a	) > rec_preference.index(_a	):
                UpperCAmelCase     			=						donor
                UpperCAmelCase     			=						recipient
                unmatched_donors.append(_a	)
                unmatched_donors.remove(_a	)
        else:
            UpperCAmelCase     			=						donor
            UpperCAmelCase     			=						recipient
            unmatched_donors.remove(_a	)
    return donor_record




