


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


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



from typing import List, Optional, Tuple, Union

from . import logging
from .import_utils import is_torch_available, is_torch_version


if is_torch_available():
						import torch

_UpperCAmelCase     :					List[Any]       =logging.get_logger(__name__)  # pylint: disable=invalid-name

try:
						from torch._dynamo import allow_in_graph as maybe_allow_in_graph
except (ImportError, ModuleNotFoundError):



						def      lowerCAmelCase	(						cls	)->	int:
										return cls



def      lowerCAmelCase	(						lowerCAmelCase_	,				lowerCAmelCase_ = None	,				lowerCAmelCase_ = None	,				lowerCAmelCase_ = None	,				lowerCAmelCase_ = None	,				)->	int:
				lowerCAmelCase_	: Tuple      			=			device
				lowerCAmelCase_	: List[str]      			=			shape[0]

				lowerCAmelCase_	: Union[str, Any]      			=			layout or torch.strided
				lowerCAmelCase_	: Union[str, Any]      			=			device or torch.device('''cpu'''	)

				if generator is not None:
								lowerCAmelCase_	: List[str]      			=			generator.device.type if not isinstance(lowerCAmelCase_	,				lowerCAmelCase_	) else generator[0].device.type
								if gen_device_type != device.type and gen_device_type == "cpu":
												lowerCAmelCase_	: Optional[Any]      			=			'''cpu'''
												if device != "mps":
																logger.info(
																    f"""The passed generator was created on 'cpu' even though a tensor on {device} was expected."""
																    f""" Tensors will be created on 'cpu' and then moved to {device}. Note that one can probably"""
																    f""" slighly speed up this function by passing a generator that was created on the {device} device."""	)
								elif gen_device_type != device.type and gen_device_type == "cuda":
												raise ValueError(f"""Cannot generate a {device} tensor from a generator of type {gen_device_type}."""	)

				if isinstance(lowerCAmelCase_	,				lowerCAmelCase_	):
								lowerCAmelCase_	: Dict      			=			(1,) + shape[1:]
								lowerCAmelCase_	: Union[str, Any]      			=			[
								    torch.randn(lowerCAmelCase_	,				generator=generator[i]	,				device=lowerCAmelCase_	,				dtype=lowerCAmelCase_	,				layout=lowerCAmelCase_	)
								    for i in range(lowerCAmelCase_	)
								]
								lowerCAmelCase_	: Tuple      			=			torch.cat(lowerCAmelCase_	,				dim=0	).to(lowerCAmelCase_	)
				else:
								lowerCAmelCase_	: int      			=			torch.randn(lowerCAmelCase_	,				generator=lowerCAmelCase_	,				device=lowerCAmelCase_	,				dtype=lowerCAmelCase_	,				layout=lowerCAmelCase_	).to(lowerCAmelCase_	)

				return latents




def      lowerCAmelCase	(						lowerCAmelCase_	)->	Optional[Any]:
				if is_torch_version('''<'''	,				'''2.0.0'''	) or not hasattr(lowerCAmelCase_	,				'''_dynamo'''	):
								return False
				return isinstance(lowerCAmelCase_	,				torch._dynamo.eval_frame.OptimizedModule	)