

from __future__ import annotations

def    A_  (							a					,   a					,   a					,   a  ):

      """simple docstring"""



      SCREAMING_SNAKE_CASE_				:  int           =     []
      SCREAMING_SNAKE_CASE_       ,						SCREAMING_SNAKE_CASE_				:  List[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_				:  int           =     result + left + right
      return input_list

def    A_  (							a  ):

      """simple docstring"""



      if len(a  ) <= 1:
            return input_list
      SCREAMING_SNAKE_CASE_				:  Optional[Any]           =     list(a  )

      # iteration for two-way merging
      SCREAMING_SNAKE_CASE_				:  List[Any]           =     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_				:  int           =     i
                  SCREAMING_SNAKE_CASE_				:  Optional[Any]           =     i + p - 1
                  SCREAMING_SNAKE_CASE_				:  int           =     (low + high + 1) // 2
                  SCREAMING_SNAKE_CASE_				:  Any           =     merge(a					,   a					,   a					,   a  )
            # final merge of last two parts
            if p * 2 >= len(a  ):
                  SCREAMING_SNAKE_CASE_				:  Optional[Any]           =     i
                  SCREAMING_SNAKE_CASE_				:  Optional[int]           =     merge(a					,   0					,   a					,   len(a  ) - 1  )
                  break
            p *= 2

      return input_list


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









def    A_  (							a					,   a  ):

      """simple docstring"""



      return int((input_a, input_a).count(0  ) != 0  )

def    A_  (							):

      """simple docstring"""



      assert nand_gate(0					,   0  ) == 1
      assert nand_gate(0					,   1  ) == 1
      assert nand_gate(1					,   0  ) == 1
      assert nand_gate(1					,   1  ) == 0


if __name__ == "__main__":
    print(nand_gate(0, 0))
    print(nand_gate(0, 1))
    print(nand_gate(1, 0))
    print(nand_gate(1, 1))






