
"""simple docstring"""



from __future__ import annotations
def 					_UpperCAmelCase      ( __lowerCamelCase   :       Optional[Any] ,					__lowerCamelCase   :       str ,					__lowerCamelCase   :       Optional[int] ,					__lowerCamelCase   :       List[str]		)     ->					List[str]:
  _snake_case					     =       []
  _snake_case     ,					_snake_case					     =       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		)		)
  _snake_case					     =       result + left + right
  return input_list
def 					_UpperCAmelCase      ( __lowerCamelCase   :       str		)     ->					Union[str, Any]:




  if len(__lowerCamelCase		) <= 1:
    return input_list
  _snake_case					     =       list(__lowerCamelCase		)

  # iteration for two-way merging
  _snake_case					     =       2
  while p <= len(__lowerCamelCase		):
    # getting low, high and middle value for merge-sort of single list
    for i in range(0 ,					len(__lowerCamelCase		) ,					__lowerCamelCase		):
      _snake_case					     =       i
      _snake_case					     =       i + p - 1
      _snake_case					     =       (low + high + 1) // 2
      _snake_case					     =       merge(__lowerCamelCase ,					__lowerCamelCase ,					__lowerCamelCase ,					__lowerCamelCase		)
    # final merge of last two parts
    if p * 2 >= len(__lowerCamelCase		):
      _snake_case					     =       i
      _snake_case					     =       merge(__lowerCamelCase ,					0 ,					__lowerCamelCase ,					len(__lowerCamelCase		) - 1		)
      break
    p *= 2

  return input_list


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







import socket
def 			_a (      ):


		"""simple docstring"""




		lowercase__            =      socket.socket(socket.AF_INET						,				socket.SOCK_STREAM     )
		lowercase__            =      socket.gethostname()
		lowercase__            =      1_23_12

		sock.connect((host, port)     )
		sock.send(B'''Hello server!'''     )

		with open('''Received_file'''						,				'''wb'''     ) as out_file:
				print('''File opened'''     )
				print('''Receiving data...'''     )
				while True:
						lowercase__            =      sock.recv(10_24     )
						if not data:
								break
						out_file.write(SCREAMING_SNAKE_CASE     )

		print('''Successfully received the file'''     )
		sock.close()
		print('''Connection closed'''     )


if __name__ == "__main__":
			main()


