






"""simple docstring"""



import torch
from transformers import PreTrainedModel, XLMRobertaConfig, XLMRobertaModel




class 			lowerCAmelCase__			(    __magic_name__   ):
   SCREAMING_SNAKE_CASE_    ='''M-CLIP'''
   def __init__(		self      :	str							,			snake_case__      :	Tuple=1_0_2_4							,			snake_case__      :	Tuple=7_6_8							,			**snake_case__      :	Dict							):


        '''simple docstring'''
        UpperCAmelCase__						:    List[Any]							=							transformerDimSize
        UpperCAmelCase__						:    Tuple							=							imageDimSize
        super().__init__(**snake_case__							)




class 			lowerCAmelCase__			(    __magic_name__   ):
   SCREAMING_SNAKE_CASE_    =MCLIPConfig
   def __init__(		self      :	Any							,			snake_case__      :	Dict							,			*snake_case__      :	Union[str, Any]							,			**snake_case__      :	Tuple							):


        '''simple docstring'''
        super().__init__(snake_case__							,			*snake_case__							,			**snake_case__							)
        UpperCAmelCase__						:    Optional[Any]							=							XLMRobertaModel(snake_case__							)
        UpperCAmelCase__						:    Union[str, Any]							=							torch.nn.Linear(
            in_features=config.transformerDimensions							,			out_features=config.numDims							)




   def       __a							(		self      :	Optional[Any]							,			snake_case__      :	Optional[int]							,			snake_case__      :	Tuple							):


        '''simple docstring'''
        UpperCAmelCase__						:    Tuple							=							self.transformer(input_ids=snake_case__							,			attention_mask=snake_case__							)[0]
        UpperCAmelCase__						:    int							=							(embs * attention_mask.unsqueeze(2							)).sum(dim=1							) / attention_mask.sum(dim=1							)[:, None]
        return self.LinearTransformation(snake_case__							), embs










"""simple docstring"""



def 	SCREAMING_SNAKE_CASE__       (  snake_case       : list				)->		list:






     '''simple docstring'''



     UpperCAmelCase__						:    List[str]							=							False
     while is_sorted is False:  # Until all the indices are traversed keep looping
          UpperCAmelCase__						:    List[Any]							=							True
          for i in range(0			,					len(snake_case				) - 1			,					2				):  # iterating over all even indices
               if input_list[i] > input_list[i + 1]:
                    UpperCAmelCase__							,				UpperCAmelCase__						:    Optional[int]							=							input_list[i + 1], input_list[i]
                    # swapping if elements not in order
                    UpperCAmelCase__						:    int							=							False

          for i in range(1			,					len(snake_case				) - 1			,					2				):  # iterating over all odd indices
               if input_list[i] > input_list[i + 1]:
                    UpperCAmelCase__							,				UpperCAmelCase__						:    Optional[int]							=							input_list[i + 1], input_list[i]
                    # swapping if elements not in order
                    UpperCAmelCase__						:    str							=							False
     return input_list


if __name__ == "__main__":
 print("""Enter list to be sorted""")
 _lowerCAmelCase	:	List[str]				=      [int(x) for x in input().split()]
 # inputing elements of the list in one line
 _lowerCAmelCase	:	Optional[int]				=      odd_even_sort(input_list)
 print("""The sorted list is""")
 print(sorted_list)


