


import json
from typing import TYPE_CHECKING, List, Optional, Tuple

from tokenizers import pre_tokenizers

from ...tokenization_utils_base import AddedToken, BatchEncoding
from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_deberta import DebertaTokenizer


if TYPE_CHECKING:
       from transformers.pipelines.conversational import Conversation


lowercase_           =	logging.get_logger(__name__)

lowercase_           =	{'vocab_file': 'vocab.json', 'merges_file': 'merges.txt', 'tokenizer_file': 'tokenizer.json'}

lowercase_           =	{
    'vocab_file': {
        'microsoft/deberta-base': 'https://huggingface.co/microsoft/deberta-base/resolve/main/vocab.json',
        'microsoft/deberta-large': 'https://huggingface.co/microsoft/deberta-large/resolve/main/vocab.json',
        'microsoft/deberta-xlarge': 'https://huggingface.co/microsoft/deberta-xlarge/resolve/main/vocab.json',
        'microsoft/deberta-base-mnli': 'https://huggingface.co/microsoft/deberta-base-mnli/resolve/main/vocab.json',
        'microsoft/deberta-large-mnli': 'https://huggingface.co/microsoft/deberta-large-mnli/resolve/main/vocab.json',
        'microsoft/deberta-xlarge-mnli': (
            'https://huggingface.co/microsoft/deberta-xlarge-mnli/resolve/main/vocab.json'
        ),
    },
    'merges_file': {
        'microsoft/deberta-base': 'https://huggingface.co/microsoft/deberta-base/resolve/main/merges.txt',
        'microsoft/deberta-large': 'https://huggingface.co/microsoft/deberta-large/resolve/main/merges.txt',
        'microsoft/deberta-xlarge': 'https://huggingface.co/microsoft/deberta-xlarge/resolve/main/merges.txt',
        'microsoft/deberta-base-mnli': 'https://huggingface.co/microsoft/deberta-base-mnli/resolve/main/merges.txt',
        'microsoft/deberta-large-mnli': 'https://huggingface.co/microsoft/deberta-large-mnli/resolve/main/merges.txt',
        'microsoft/deberta-xlarge-mnli': (
            'https://huggingface.co/microsoft/deberta-xlarge-mnli/resolve/main/merges.txt'
        ),
    },
}

lowercase_           =	{
    'microsoft/deberta-base': 5_1_2,
    'microsoft/deberta-large': 5_1_2,
    'microsoft/deberta-xlarge': 5_1_2,
    'microsoft/deberta-base-mnli': 5_1_2,
    'microsoft/deberta-large-mnli': 5_1_2,
    'microsoft/deberta-xlarge-mnli': 5_1_2,
}

lowercase_           =	{
    'microsoft/deberta-base': {'do_lower_case': False},
    'microsoft/deberta-large': {'do_lower_case': False},
}


class        A_					(       __UpperCamelCase    ):




      '''simple docstring'''


      __snake_case					       =   VOCAB_FILES_NAMES
      __snake_case					       =   PRETRAINED_VOCAB_FILES_MAP
      __snake_case					       =   PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
      __snake_case					       =   ["""input_ids""", """attention_mask""", """token_type_ids"""]
      __snake_case					       =   DebertaTokenizer




      def __init__(				self:       Optional[int]						,      a:       int=None						,      a:       str=None						,      a:       Dict=None						,      a:       Tuple="replace"						,      a:       List[str]="[CLS]"						,      a:       Dict="[SEP]"						,      a:       int="[SEP]"						,      a:       Any="[CLS]"						,      a:       Dict="[UNK]"						,      a:       Dict="[PAD]"						,      a:       Optional[int]="[MASK]"						,      a:       List[str]=False						,      **a:       int						,      ):
       super().__init__(
           a						,      a						,      tokenizer_file=a						,      errors=a						,      bos_token=a						,      eos_token=a						,      unk_token=a						,      sep_token=a						,      cls_token=a						,      pad_token=a						,      mask_token=a						,      add_prefix_space=a						,      **a						,      )
       __lowerCamelCase		:							str							=						kwargs.pop('add_bos_token'						,      a				)

       __lowerCamelCase		:							Dict							=						json.loads(self.backend_tokenizer.pre_tokenizer.__getstate__()				)
       if pre_tok_state.get('add_prefix_space'						,      a				) != add_prefix_space:
        __lowerCamelCase		:							Union[str, Any]							=						getattr(a						,      pre_tok_state.pop('type'				)				)
        __lowerCamelCase		:							List[str]							=						add_prefix_space
        __lowerCamelCase		:							Any							=						pre_tok_class(**a				)

       __lowerCamelCase		:							Tuple							=						add_prefix_space




      @property
      def      _snake_case	(				self:       Any				):
       if self._mask_token is None:
        if self.verbose:
         logger.error('Using mask_token, but it is not set yet.'				)
        return None
       return str(self._mask_token				)




      @mask_token.setter
      def      _snake_case	(				self:       str						,      a:       List[str]				):
       __lowerCamelCase		:							Optional[int]							=						AddedToken(a						,      lstrip=a						,      rstrip=a				) if isinstance(a						,      a				) else value
       __lowerCamelCase		:							Any							=						value




      def      _snake_case	(				self:       Dict						,      a:       List[int]						,      a:       Optional[List[int]] = None				):
       if token_ids_a is None:
        return [self.cls_token_id] + token_ids_a + [self.sep_token_id]
       __lowerCamelCase		:							Optional[int]							=						[self.cls_token_id]
       __lowerCamelCase		:							List[str]							=						[self.sep_token_id]
       return cls + token_ids_a + sep + token_ids_a + sep




      def      _snake_case	(				self:       str						,      a:       List[int]						,      a:       Optional[List[int]] = None				):
       __lowerCamelCase		:							Dict							=						[self.sep_token_id]
       __lowerCamelCase		:							List[str]							=						[self.cls_token_id]

       if token_ids_a is None:
        return len(cls + token_ids_a + sep				) * [0]
       return len(cls + token_ids_a + sep				) * [0] + len(token_ids_a + sep				) * [1]




      def      _snake_case	(				self:       Dict						,      *a:       List[str]						,      **a:       Optional[Any]				):
       __lowerCamelCase		:							List[Any]							=						kwargs.get('is_split_into_words'						,      a				)
       assert self.add_prefix_space or not is_split_into_words, (
           F'You need to instantiate {self.__class__.__name__} with add_prefix_space=True '
           "to use it with pretokenized inputs."
       )

       return super()._batch_encode_plus(*a						,      **a				)




      def      _snake_case	(				self:       List[str]						,      *a:       Any						,      **a:       int				):
       __lowerCamelCase		:							Optional[int]							=						kwargs.get('is_split_into_words'						,      a				)

       assert self.add_prefix_space or not is_split_into_words, (
           F'You need to instantiate {self.__class__.__name__} with add_prefix_space=True '
           "to use it with pretokenized inputs."
       )

       return super()._encode_plus(*a						,      **a				)




      def      _snake_case	(				self:       List[Any]						,      a:       str						,      a:       Optional[str] = None				):
       __lowerCamelCase		:							int							=						self._tokenizer.model.save(a						,      name=a				)
       return tuple(a				)




      def      _snake_case	(				self:       Union[str, Any]						,      a:       "Conversation"				):
       __lowerCamelCase		:							Tuple							=						[]
       for is_user, text in conversation.iter_texts():
        input_ids.extend(self.encode(a						,      add_special_tokens=a				) + [self.eos_token_id]				)

       if len(a				) > self.model_max_length:
        __lowerCamelCase		:							Union[str, Any]							=						input_ids[-self.model_max_length :]
       return input_ids





from __future__ import annotations


class        A_					:




      '''simple docstring'''


      def __init__(				self:       Union[str, Any]						,      a:       int				):
       __lowerCamelCase		:							List[Any]							=						data
       __lowerCamelCase		:							Optional[Any]							=						None



class        A_					:




      '''simple docstring'''


      def __init__(				self:       Dict				):
       __lowerCamelCase		:							Dict							=						None




      def      _snake_case	(				self:       Dict						,      a:       int				):
       __lowerCamelCase		:							List[Any]							=						Node(a				)
       __lowerCamelCase		:							Dict							=						self.head
       __lowerCamelCase		:							Optional[int]							=						new_node
       return self.head.data




      def      _snake_case	(				self:       Optional[Any]				):
       __lowerCamelCase		:							Union[str, Any]							=						self.head
       __lowerCamelCase		:							List[Any]							=						self.head
       if self.head:
        while fast_pointer and fast_pointer.next:
         __lowerCamelCase		:							Any							=						fast_pointer.next.next
         __lowerCamelCase		:							str							=						slow_pointer.next
        return slow_pointer.data
       else:
        print('No element found.'				)
        return None


if __name__ == "__main__":
       lowercase_           =	LinkedList()
       for _ in range(int(input().strip())):
              lowercase_           =	int(input().strip())
              link.push(data)
       print(link.middle_element())

