'''simple docstring'''





from __future__ import annotations


def     __lowerCAmelCase						(       a_       ,      a_       ,      a_       ,      a_		)      ->	list:





     '''simple docstring'''





     SCREAMING_SNAKE_CASE					:			int    	=       []
     SCREAMING_SNAKE_CASE	,   SCREAMING_SNAKE_CASE					:			Optional[Any]    	=       input_list[low:mid], input_list[mid : high + 1]
     while left and right:
          result.append((left if left[0] <= right[0] else right).pop(0		)		)
     SCREAMING_SNAKE_CASE					:			Union[str, Any]    	=       result + left + right
     return input_list


def     __lowerCAmelCase						(       a_		)      ->	list:





     '''simple docstring'''





     if len(a_		) <= 1:
          return input_list
     SCREAMING_SNAKE_CASE					:			int    	=       list(a_		)

     # iteration for two-way merging
     SCREAMING_SNAKE_CASE					:			str    	=       2
     while p <= len(a_		):
          # getting low, high and middle value for merge-sort of single list
          for i in range(0       ,      len(a_		)       ,      a_		):
               SCREAMING_SNAKE_CASE					:			Optional[Any]    	=       i
               SCREAMING_SNAKE_CASE					:			Optional[Any]    	=       i + p - 1
               SCREAMING_SNAKE_CASE					:			List[Any]    	=       (low + high + 1) // 2
               SCREAMING_SNAKE_CASE					:			str    	=       merge(a_       ,      a_       ,      a_       ,      a_		)
          # final merge of last two parts
          if p * 2 >= len(a_		):
               SCREAMING_SNAKE_CASE					:			List[Any]    	=       i
               SCREAMING_SNAKE_CASE					:			Union[str, Any]    	=       merge(a_       ,      0       ,      a_       ,      len(a_		) - 1		)
               break
          p *= 2

     return input_list


if __name__ == "__main__":
 _lowerCAmelCase  :List[str]  				=    input("""Enter numbers separated by a comma:\n""").strip()
 if user_input == "":
  _lowerCAmelCase  :Optional[int]  				=    []
 else:
  _lowerCAmelCase  :Dict  				=    [int(item.strip()) for item in user_input.split(""",""")]
 print(iter_merge_sort(unsorted))




'''simple docstring'''





from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_sentencepiece_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


_lowerCAmelCase  :int  				=    {
    """configuration_albert""": ["""ALBERT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """AlbertConfig""", """AlbertOnnxConfig"""],
}

try:
 if not is_sentencepiece_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _lowerCAmelCase  :str  				=    ["""AlbertTokenizer"""]

try:
 if not is_tokenizers_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _lowerCAmelCase  :Optional[int]  				=    ["""AlbertTokenizerFast"""]

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _lowerCAmelCase  :List[str]  				=    [
     """ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
     """AlbertForMaskedLM""",
     """AlbertForMultipleChoice""",
     """AlbertForPreTraining""",
     """AlbertForQuestionAnswering""",
     """AlbertForSequenceClassification""",
     """AlbertForTokenClassification""",
     """AlbertModel""",
     """AlbertPreTrainedModel""",
     """load_tf_weights_in_albert""",
 ]

try:
 if not is_tf_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _lowerCAmelCase  :Any  				=    [
     """TF_ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
     """TFAlbertForMaskedLM""",
     """TFAlbertForMultipleChoice""",
     """TFAlbertForPreTraining""",
     """TFAlbertForQuestionAnswering""",
     """TFAlbertForSequenceClassification""",
     """TFAlbertForTokenClassification""",
     """TFAlbertMainLayer""",
     """TFAlbertModel""",
     """TFAlbertPreTrainedModel""",
 ]

try:
 if not is_flax_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _lowerCAmelCase  :Optional[int]  				=    [
     """FlaxAlbertForMaskedLM""",
     """FlaxAlbertForMultipleChoice""",
     """FlaxAlbertForPreTraining""",
     """FlaxAlbertForQuestionAnswering""",
     """FlaxAlbertForSequenceClassification""",
     """FlaxAlbertForTokenClassification""",
     """FlaxAlbertModel""",
     """FlaxAlbertPreTrainedModel""",
 ]

if TYPE_CHECKING:
 from .configuration_albert import ALBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, AlbertConfig, AlbertOnnxConfig

 try:
  if not is_sentencepiece_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_albert import AlbertTokenizer

 try:
  if not is_tokenizers_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_albert_fast import AlbertTokenizerFast

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_albert import (
      ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
      AlbertForMaskedLM,
      AlbertForMultipleChoice,
      AlbertForPreTraining,
      AlbertForQuestionAnswering,
      AlbertForSequenceClassification,
      AlbertForTokenClassification,
      AlbertModel,
      AlbertPreTrainedModel,
      load_tf_weights_in_albert,
  )

 try:
  if not is_tf_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_tf_albert import (
      TF_ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
      TFAlbertForMaskedLM,
      TFAlbertForMultipleChoice,
      TFAlbertForPreTraining,
      TFAlbertForQuestionAnswering,
      TFAlbertForSequenceClassification,
      TFAlbertForTokenClassification,
      TFAlbertMainLayer,
      TFAlbertModel,
      TFAlbertPreTrainedModel,
  )

 try:
  if not is_flax_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_flax_albert import (
      FlaxAlbertForMaskedLM,
      FlaxAlbertForMultipleChoice,
      FlaxAlbertForPreTraining,
      FlaxAlbertForQuestionAnswering,
      FlaxAlbertForSequenceClassification,
      FlaxAlbertForTokenClassification,
      FlaxAlbertModel,
      FlaxAlbertPreTrainedModel,
  )
else:
 import sys

 _lowerCAmelCase  :Union[str, Any]  				=    _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)



