


from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCAmelCase_   :				Tuple						      = logging.get_logger(__name__)

UpperCAmelCase_   :				Optional[int]						      = {
    'alibaba-damo/mgp-str-base': 'https://huggingface.co/alibaba-damo/mgp-str-base/resolve/main/config.json',
}
class 				SCREAMING_SNAKE_CASE__						(       lowercase__    ):
      snake_case__       :  Union[str, Any]       =		'''mgp-str'''
      def __init__( self       : List[Any]  ,							SCREAMING_SNAKE_CASE__       : Union[str, Any]=[3_2, 1_2_8]  ,							SCREAMING_SNAKE_CASE__       : int=4  ,							SCREAMING_SNAKE_CASE__       : Tuple=3  ,							SCREAMING_SNAKE_CASE__       : List[str]=2_7  ,							SCREAMING_SNAKE_CASE__       : List[Any]=3_8  ,							SCREAMING_SNAKE_CASE__       : Any=5_0_2_5_7  ,							SCREAMING_SNAKE_CASE__       : List[Any]=3_0_5_2_2  ,							SCREAMING_SNAKE_CASE__       : Any=7_6_8  ,							SCREAMING_SNAKE_CASE__       : Optional[Any]=1_2  ,							SCREAMING_SNAKE_CASE__       : str=1_2  ,							SCREAMING_SNAKE_CASE__       : Tuple=4.0  ,							SCREAMING_SNAKE_CASE__       : List[str]=True  ,							SCREAMING_SNAKE_CASE__       : int=False  ,							SCREAMING_SNAKE_CASE__       : Union[str, Any]=1E-5  ,							SCREAMING_SNAKE_CASE__       : Any=0.0  ,							SCREAMING_SNAKE_CASE__       : Optional[Any]=0.0  ,							SCREAMING_SNAKE_CASE__       : str=0.0  ,							SCREAMING_SNAKE_CASE__       : Tuple=False  ,							SCREAMING_SNAKE_CASE__       : List[Any]=0.02  ,							**SCREAMING_SNAKE_CASE__       : Union[str, Any]  ,							)	->    List[str]:
             super().__init__(**SCREAMING_SNAKE_CASE__  )

             a_      :	List[Any]							=						image_size
             a_      :	int							=						patch_size
             a_      :	List[str]							=						num_channels
             a_      :	Dict							=						max_token_length
             a_      :	List[Any]							=						num_character_labels
             a_      :	Union[str, Any]							=						num_bpe_labels
             a_      :	Optional[int]							=						num_wordpiece_labels
             a_      :	Optional[Any]							=						hidden_size
             a_      :	int							=						num_hidden_layers
             a_      :	List[Any]							=						num_attention_heads
             a_      :	Optional[Any]							=						mlp_ratio
             a_      :	List[str]							=						distilled
             a_      :	int							=						layer_norm_eps
             a_      :	int							=						drop_rate
             a_      :	Any							=						qkv_bias
             a_      :	List[str]							=						attn_drop_rate
             a_      :	Union[str, Any]							=						drop_path_rate
             a_      :	Optional[int]							=						output_aa_attentions
             a_      :	Dict							=						initializer_range






def  SCREAMING_SNAKE_CASE_		(    __A				:    list       )			->	list:

       """simple docstring"""

       if len(__A       ) <= 1:
              return [tuple(__A       )]

       a_      :	Optional[Any]							=						[]

       def generate(__A				:    int						,					__A				:    list       ):
              a_      :	str							=						[0] * n
              res.append(tuple(__A       )       )

              a_      :	Optional[int]							=						0
              while i < n:
                     if c[i] < i:
                            if i % 2 == 0:
                                   a_							,	a_      :	Dict							=						arr[i], arr[0]
                            else:
                                   a_							,	a_      :	Union[str, Any]							=						arr[i], arr[c[i]]
                            res.append(tuple(__A       )       )
                            c[i] += 1
                            a_      :	Dict							=						0
                     else:
                            a_      :	Optional[Any]							=						0
                            i += 1

       generate(len(__A       )						,					__A       )
       return res


if __name__ == "__main__":
   UpperCAmelCase_   :				Union[str, Any]						      = input('Enter numbers separated by a comma:\n').strip()
   UpperCAmelCase_   :				Optional[Any]						      = [int(item) for item in user_input.split(',')]
   print(heaps(arr))


