

from typing import Dict, List, Optional, Union

import numpy as np

from ...image_processing_utils import BaseImageProcessor, BatchFeature, get_size_dict
from ...image_transforms import (
    center_crop,
    convert_to_rgb,
    get_resize_output_image_size,
    normalize,
    rescale,
    resize,
    to_channel_dimension_format,
)
from ...image_utils import (
    OPENAI_CLIP_MEAN,
    OPENAI_CLIP_STD,
    ChannelDimension,
    ImageInput,
    PILImageResampling,
    make_list_of_images,
    to_numpy_array,
    valid_images,
)
from ...utils import TensorType, is_vision_available, logging


_lowerCAmelCase  :      Union[str, Any]			 =logging.get_logger(__name__)


if is_vision_available():
					import PIL

class __UpperCamelCase     (				_a		):






					'''simple docstring'''



					__magic_name__        =   ["pixel_values"]





					def __init__(				self				,      lowerCamelCase__ = True				,      lowerCamelCase__ = None				,      lowerCamelCase__ = PILImageResampling.BICUBIC				,      lowerCamelCase__ = True				,      lowerCamelCase__ = None				,      lowerCamelCase__ = True				,      lowerCamelCase__ = 1 / 2_5_5				,      lowerCamelCase__ = True				,      lowerCamelCase__ = None				,      lowerCamelCase__ = None				,      lowerCamelCase__ = True				,      **lowerCamelCase__				,      ):
						super().__init__(**lowerCamelCase__						)
						UpperCAmelCase__:	Optional[Any]									= size if size is not None else {"shortest_edge": 2_2_4}
						UpperCAmelCase__:	Any									= get_size_dict(lowerCamelCase__				,      default_to_square=lowerCamelCase__						)
						UpperCAmelCase__:	List[Any]									= crop_size if crop_size is not None else {"height": 2_2_4, "width": 2_2_4}
						UpperCAmelCase__:	Union[str, Any]									= get_size_dict(lowerCamelCase__				,      default_to_square=lowerCamelCase__				,      param_name="crop_size"						)

						UpperCAmelCase__:	List[Any]									= do_resize
						UpperCAmelCase__:	Optional[Any]									= size
						UpperCAmelCase__:	int									= resample
						UpperCAmelCase__:	str									= do_center_crop
						UpperCAmelCase__:	Tuple									= crop_size
						UpperCAmelCase__:	int									= do_rescale
						UpperCAmelCase__:	Optional[Any]									= rescale_factor
						UpperCAmelCase__:	Union[str, Any]									= do_normalize
						UpperCAmelCase__:	Tuple									= image_mean if image_mean is not None else OPENAI_CLIP_MEAN
						UpperCAmelCase__:	List[Any]									= image_std if image_std is not None else OPENAI_CLIP_STD
						UpperCAmelCase__:	Optional[int]									= do_convert_rgb





					def    _UpperCAmelCase    (				self				,      lowerCamelCase__				,      lowerCamelCase__				,      lowerCamelCase__ = PILImageResampling.BICUBIC				,      lowerCamelCase__ = None				,      **lowerCamelCase__				,      ):
						UpperCAmelCase__:	Tuple									= get_size_dict(lowerCamelCase__				,      default_to_square=lowerCamelCase__						)
						if "shortest_edge" not in size:
							raise ValueError(F"The `size` parameter must contain the key `shortest_edge`. Got {size.keys()}"						)
						UpperCAmelCase__:	str									= get_resize_output_image_size(lowerCamelCase__				,      size=size["shortest_edge"]				,      default_to_square=lowerCamelCase__						)
						return resize(lowerCamelCase__				,      size=lowerCamelCase__				,      resample=lowerCamelCase__				,      data_format=lowerCamelCase__				,      **lowerCamelCase__						)





					def    _UpperCAmelCase    (				self				,      lowerCamelCase__				,      lowerCamelCase__				,      lowerCamelCase__ = None				,      **lowerCamelCase__				,      ):
						UpperCAmelCase__:	Optional[Any]									= get_size_dict(lowerCamelCase__						)
						if "height" not in size or "width" not in size:
							raise ValueError(F"The `size` parameter must contain the keys (height, width). Got {size.keys()}"						)
						return center_crop(lowerCamelCase__				,      size=(size["height"], size["width"])				,      data_format=lowerCamelCase__				,      **lowerCamelCase__						)





					def    _UpperCAmelCase    (				self				,      lowerCamelCase__				,      lowerCamelCase__				,      lowerCamelCase__ = None				,      **lowerCamelCase__				,      ):
						return rescale(lowerCamelCase__				,      scale=lowerCamelCase__				,      data_format=lowerCamelCase__				,      **lowerCamelCase__						)





					def    _UpperCAmelCase    (				self				,      lowerCamelCase__				,      lowerCamelCase__				,      lowerCamelCase__				,      lowerCamelCase__ = None				,      **lowerCamelCase__				,      ):
						return normalize(lowerCamelCase__				,      mean=lowerCamelCase__				,      std=lowerCamelCase__				,      data_format=lowerCamelCase__				,      **lowerCamelCase__						)





					def    _UpperCAmelCase    (				self				,      lowerCamelCase__				,      lowerCamelCase__ = None				,      lowerCamelCase__ = None				,      lowerCamelCase__ = None				,      lowerCamelCase__ = None				,      lowerCamelCase__ = None				,      lowerCamelCase__ = None				,      lowerCamelCase__ = None				,      lowerCamelCase__ = None				,      lowerCamelCase__ = None				,      lowerCamelCase__ = None				,      lowerCamelCase__ = None				,      lowerCamelCase__ = None				,      lowerCamelCase__ = ChannelDimension.FIRST				,      **lowerCamelCase__				,      ):
						UpperCAmelCase__:	List[str]									= do_resize if do_resize is not None else self.do_resize
						UpperCAmelCase__:	str									= size if size is not None else self.size
						UpperCAmelCase__:	Any									= get_size_dict(lowerCamelCase__				,      param_name="size"				,      default_to_square=lowerCamelCase__						)
						UpperCAmelCase__:	List[Any]									= resample if resample is not None else self.resample
						UpperCAmelCase__:	Dict									= do_center_crop if do_center_crop is not None else self.do_center_crop
						UpperCAmelCase__:	Optional[int]									= crop_size if crop_size is not None else self.crop_size
						UpperCAmelCase__:	Dict									= get_size_dict(lowerCamelCase__				,      param_name="crop_size"				,      default_to_square=lowerCamelCase__						)
						UpperCAmelCase__:	Optional[Any]									= do_rescale if do_rescale is not None else self.do_rescale
						UpperCAmelCase__:	Union[str, Any]									= rescale_factor if rescale_factor is not None else self.rescale_factor
						UpperCAmelCase__:	List[Any]									= do_normalize if do_normalize is not None else self.do_normalize
						UpperCAmelCase__:	str									= image_mean if image_mean is not None else self.image_mean
						UpperCAmelCase__:	Union[str, Any]									= image_std if image_std is not None else self.image_std
						UpperCAmelCase__:	Union[str, Any]									= do_convert_rgb if do_convert_rgb is not None else self.do_convert_rgb

						UpperCAmelCase__:	List[Any]									= make_list_of_images(lowerCamelCase__						)

						if not valid_images(lowerCamelCase__						):
							raise ValueError(
							    "Invalid image type. Must be of type PIL.Image.Image, numpy.ndarray, "
							    "torch.Tensor, tf.Tensor or jax.ndarray."						)

						if do_resize and size is None:
							raise ValueError("Size must be specified if do_resize is True."						)

						if do_center_crop and crop_size is None:
							raise ValueError("Crop size must be specified if do_center_crop is True."						)

						if do_rescale and rescale_factor is None:
							raise ValueError("Rescale factor must be specified if do_rescale is True."						)

						if do_normalize and (image_mean is None or image_std is None):
							raise ValueError("Image mean and std must be specified if do_normalize is True."						)

						# PIL RGBA images are converted to RGB
						if do_convert_rgb:
							UpperCAmelCase__:	Optional[Any]									= [convert_to_rgb(lowerCamelCase__						) for image in images]

						# All transformations expect numpy arrays.
						UpperCAmelCase__:	Optional[Any]									= [to_numpy_array(lowerCamelCase__						) for image in images]

						if do_resize:
							UpperCAmelCase__:	Union[str, Any]									= [self.resize(image=lowerCamelCase__				,      size=lowerCamelCase__				,      resample=lowerCamelCase__						) for image in images]

						if do_center_crop:
							UpperCAmelCase__:	Union[str, Any]									= [self.center_crop(image=lowerCamelCase__				,      size=lowerCamelCase__						) for image in images]

						if do_rescale:
							UpperCAmelCase__:	int									= [self.rescale(image=lowerCamelCase__				,      scale=lowerCamelCase__						) for image in images]

						if do_normalize:
							UpperCAmelCase__:	Dict									= [self.normalize(image=lowerCamelCase__				,      mean=lowerCamelCase__				,      std=lowerCamelCase__						) for image in images]

						UpperCAmelCase__:	Dict									= [to_channel_dimension_format(lowerCamelCase__				,      lowerCamelCase__						) for image in images]

						UpperCAmelCase__:	Optional[int]									= {"pixel_values": images}
						return BatchFeature(data=lowerCamelCase__				,      tensor_type=lowerCamelCase__						)


def 			_A	(      SCREAMING_SNAKE_CASE      ):
	UpperCAmelCase__							,						UpperCAmelCase__:	int									= [], []
	while len(SCREAMING_SNAKE_CASE      ) > 1:
		UpperCAmelCase__							,						UpperCAmelCase__:	str									= min(SCREAMING_SNAKE_CASE      ), max(SCREAMING_SNAKE_CASE      )
		start.append(SCREAMING_SNAKE_CASE      )
		end.append(SCREAMING_SNAKE_CASE      )
		collection.remove(SCREAMING_SNAKE_CASE      )
		collection.remove(SCREAMING_SNAKE_CASE      )
	end.reverse()
	return start + collection + end


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