

'''simple docstring'''



from __future__ import annotations

class 			SCREAMING_SNAKE_CASE					:




      def __init__(					self :		Union[str, Any]     ,					snake_case :		int   ):



          """simple docstring"""





          _snake_case : Any												=		data
          _snake_case : Union[str, Any]												=		None



class 			SCREAMING_SNAKE_CASE					:




      def __init__(					self :		List[Any]   ):



          """simple docstring"""





          _snake_case : int												=		None




      def 	__UpperCAmelCase			(					self :		Optional[Any]     ,					snake_case :		int   ):



          """simple docstring"""





          _snake_case : str												=		Node(UpperCamelCase__   )
          _snake_case : Tuple												=		self.head
          _snake_case : Tuple												=		new_node
          return self.head.data




      def 	__UpperCAmelCase			(					self :		Union[str, Any]   ):



          """simple docstring"""





          _snake_case : Tuple												=		self.head
          _snake_case : int												=		self.head
          if self.head:
              while fast_pointer and fast_pointer.next:
                  _snake_case : Any												=		fast_pointer.next.next
                  _snake_case : Optional[int]												=		slow_pointer.next
              return slow_pointer.data
          else:
              print('No element found.'   )
              return None


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






'''simple docstring'''



from typing import List, Optional, Tuple, Union

from . import logging
from .import_utils import is_torch_available, is_torch_version


if is_torch_available():
   import torch

SCREAMING_SNAKE_CASE_    =   logging.get_logger(__name__)  # pylint: disable=invalid-name

try:
   from torch._dynamo import allow_in_graph as maybe_allow_in_graph
except (ImportError, ModuleNotFoundError):

   def   lowerCamelCase__       (      cls)		->    Optional[Any]:



       """simple docstring"""







       return cls

def   lowerCamelCase__       (      a__			,      a__ = None			,      a__ = None			,      a__ = None			,      a__ = None			,      )		->    Dict:



    """simple docstring"""







    _snake_case : Optional[Any]												=		device
    _snake_case : Any												=		shape[0]

    _snake_case : str												=		layout or torch.strided
    _snake_case : str												=		device or torch.device('cpu')

    if generator is not None:
        _snake_case : Any												=		generator.device.type if not isinstance(a__			,      a__) else generator[0].device.type
        if gen_device_type != device.type and gen_device_type == "cpu":
            _snake_case : Optional[Any]												=		'cpu'
            if device != "mps":
                logger.info(
                    F"""The passed generator was created on 'cpu' even though a tensor on {device} was expected."""
                    F""" Tensors will be created on 'cpu' and then moved to {device}. Note that one can probably"""
                    F""" slighly speed up this function by passing a generator that was created on the {device} device.""")
        elif gen_device_type != device.type and gen_device_type == "cuda":
            raise ValueError(F"""Cannot generate a {device} tensor from a generator of type {gen_device_type}.""")

    if isinstance(a__			,      a__):
        _snake_case : Any												=		(1,) + shape[1:]
        _snake_case : int												=		[
            torch.randn(a__			,      generator=generator[i]			,      device=a__			,      dtype=a__			,      layout=a__)
            for i in range(a__)
        ]
        _snake_case : Optional[int]												=		torch.cat(a__			,      dim=0).to(a__)
    else:
        _snake_case : Optional[Any]												=		torch.randn(a__			,      generator=a__			,      device=a__			,      dtype=a__			,      layout=a__).to(a__)

    return latents




def   lowerCamelCase__       (      a__)		->    Optional[Any]:



    """simple docstring"""







    if is_torch_version('<'			,      '2.0.0') or not hasattr(a__			,      '_dynamo'):
        return False
    return isinstance(a__			,      torch._dynamo.eval_frame.OptimizedModule)



