

'''simple docstring'''
def 					_A		(	snake_case     )			->	List[Any]:
   _lowercase			:      Optional[int]			     =   [], []
   while len(__a     ) > 1:
      _lowercase			:      Union[str, Any]			     =   min(__a     ), max(__a     )
      start.append(__a     )
      end.append(__a     )
      collection.remove(__a     )
      collection.remove(__a     )
   end.reverse()
   return start + collection + end


if __name__ == "__main__":
    _snake_case     =  input('Enter numbers separated by a comma:\n').strip()
    _snake_case     =  [int(item) for item in user_input.split(',')]
    print(*merge_sort(unsorted), sep=',')










'''simple docstring'''
from datetime import datetime

import matplotlib.pyplot as plt
import torch


def 			a      (			__a   )  ->	int:



					'''simple docstring'''






					for param in module.parameters():
										UpperCamelCase__   :Dict												= False


def 			a      (			)  ->	Union[str, Any]:



					'''simple docstring'''






					UpperCamelCase__   :List[Any]												= '''cuda''' if torch.cuda.is_available() else '''cpu'''
					if torch.backends.mps.is_available() and torch.backends.mps.is_built():
										UpperCamelCase__   :Optional[int]												= '''mps'''
					if device == "mps":
										print(
										    '''WARNING: MPS currently doesn\'t seem to work, and messes up backpropagation without any visible torch'''
										    ''' errors. I recommend using CUDA on a colab notebook or CPU instead if you\'re facing inexplicable issues'''
										    ''' with generations.'''   )
					return device


def 			a      (			__a   )  ->	Any:



					'''simple docstring'''






					UpperCamelCase__   :Dict												= plt.imshow(__a   )
					fig.axes.get_xaxis().set_visible(__a   )
					fig.axes.get_yaxis().set_visible(__a   )
					plt.show()







def 			a      (			)  ->	str:



					'''simple docstring'''






					UpperCamelCase__   :int												= datetime.now()
					UpperCamelCase__   :str												= current_time.strftime('''%H:%M:%S'''   )
					return timestamp