


'''simple docstring'''
from __future__ import annotations


def      a (     __a					,   __a					,   __a					,   __a  )    ->      list:



					'''simple docstring'''






					UpperCamelCase__  :List[str]				   =					[]
					UpperCamelCase__   ,							UpperCamelCase__  :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  )  )
					UpperCamelCase__  :str				   =					result + left + right
					return input_list


def      a (     __a  )    ->      list:



					'''simple docstring'''






					if len(__a  ) <= 1:
										return input_list
					UpperCamelCase__  :List[str]				   =					list(__a  )

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

					return input_list


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



'''simple docstring'''
from dataclasses import dataclass
from typing import Optional, Tuple

import torch
from torch import nn
from transformers import RobertaPreTrainedModel, XLMRobertaConfig, XLMRobertaModel
from transformers.utils import ModelOutput
@dataclass
class   lowercase      (				A__   ):

		"""simple docstring"""

		_a       					=							None
		_a       					=							None
		_a       					=							None
		_a       					=							None



class   lowercase      (				A__   ):

		"""simple docstring"""

		def __init__(						self       ,  UpperCamelCase_=1       ,  UpperCamelCase_=0       ,  UpperCamelCase_=2       ,  UpperCamelCase_=512       ,  UpperCamelCase_="cls"       ,  UpperCamelCase_=False       ,  UpperCamelCase_=True       ,  **UpperCamelCase_       ,  ):

							'''simple docstring'''


							super().__init__(pad_token_id=UpperCamelCase_       ,  bos_token_id=UpperCamelCase_       ,  eos_token_id=UpperCamelCase_       ,  **UpperCamelCase_				)
							UpperCamelCase__  :Optional[int]				   =					project_dim
							UpperCamelCase__  :List[str]				   =					pooler_fn
							UpperCamelCase__  :Dict				   =					learn_encoder
							UpperCamelCase__  :Any				   =					use_attention_mask



class   lowercase      (				A__   ):

		"""simple docstring"""

		_a       					=							[R'pooler', R'logit_scale']
		_a       					=							[R'position_ids', R'predictions.decoder.bias']
		_a       					=							'roberta'
		_a       					=							RobertaSeriesConfig




		def __init__(						self       ,  UpperCamelCase_				):

							'''simple docstring'''


							super().__init__(UpperCamelCase_				)
							UpperCamelCase__  :Optional[Any]				   =					XLMRobertaModel(UpperCamelCase_				)
							UpperCamelCase__  :Tuple				   =					nn.Linear(config.hidden_size       ,  config.project_dim				)
							UpperCamelCase__  :Union[str, Any]				   =					getattr(UpperCamelCase_       ,  '''has_pre_transformation'''       ,  UpperCamelCase_				)
							if self.has_pre_transformation:
												UpperCamelCase__  :Any				   =					nn.Linear(config.hidden_size       ,  config.project_dim				)
												UpperCamelCase__  :str				   =					nn.LayerNorm(config.hidden_size       ,  eps=config.layer_norm_eps				)
							self.post_init()




		def        lowerCAmelCase__							(						self       ,  UpperCamelCase_ = None       ,  UpperCamelCase_ = None       ,  UpperCamelCase_ = None       ,  UpperCamelCase_ = None       ,  UpperCamelCase_ = None       ,  UpperCamelCase_ = None       ,  UpperCamelCase_ = None       ,  UpperCamelCase_ = None       ,  UpperCamelCase_ = None       ,  UpperCamelCase_ = None       ,  UpperCamelCase_ = None       ,  ):

							'''simple docstring'''


							UpperCamelCase__  :Optional[int]				   =					return_dict if return_dict is not None else self.config.use_return_dict

							UpperCamelCase__  :str				   =					self.base_model(
							    input_ids=UpperCamelCase_       ,  attention_mask=UpperCamelCase_       ,  token_type_ids=UpperCamelCase_       ,  position_ids=UpperCamelCase_       ,  head_mask=UpperCamelCase_       ,  inputs_embeds=UpperCamelCase_       ,  encoder_hidden_states=UpperCamelCase_       ,  encoder_attention_mask=UpperCamelCase_       ,  output_attentions=UpperCamelCase_       ,  output_hidden_states=True if self.has_pre_transformation else output_hidden_states       ,  return_dict=UpperCamelCase_       ,  )

							if self.has_pre_transformation:
												UpperCamelCase__  :Dict				   =					outputs['''hidden_states'''][-2]
												UpperCamelCase__  :Optional[int]				   =					self.pre_LN(UpperCamelCase_				)
												UpperCamelCase__  :Optional[Any]				   =					self.transformation_pre(UpperCamelCase_				)

												return TransformationModelOutput(
												    projection_state=UpperCamelCase_       ,  last_hidden_state=outputs.last_hidden_state       ,  hidden_states=outputs.hidden_states       ,  attentions=outputs.attentions       ,  )
							else:
												UpperCamelCase__  :List[Any]				   =					self.transformation(outputs.last_hidden_state				)
												return TransformationModelOutput(
												    projection_state=UpperCamelCase_       ,  last_hidden_state=outputs.last_hidden_state       ,  hidden_states=outputs.hidden_states       ,  attentions=outputs.attentions       ,  )