



from __future__ import annotations







class       UpperCAmelCase_						:



      """simple docstring"""
      def __init__(    self   ,    SCREAMING_SNAKE_CASE_			)    ->				None:
          UpperCamelCase	:str     							=       data
          UpperCamelCase	:Any     							=       None







class       UpperCAmelCase_						:



      """simple docstring"""
      def __init__(    self			)    ->				List[str]:
          UpperCamelCase	:List[str]     							=       None
      def    UpperCAmelCase						(    self   ,    SCREAMING_SNAKE_CASE_			)    ->				int:
          UpperCamelCase	:int     							=       Node(SCREAMING_SNAKE_CASE_			)
          UpperCamelCase	:Optional[Any]     							=       self.head
          UpperCamelCase	:Tuple     							=       new_node
          return self.head.data




      def    UpperCAmelCase						(    self			)    ->				int | None:
          UpperCamelCase	:List[str]     							=       self.head
          UpperCamelCase	:List[str]     							=       self.head
          if self.head:
              while fast_pointer and fast_pointer.next:
                  UpperCamelCase	:List[str]     							=       fast_pointer.next.next
                  UpperCamelCase	:Tuple     							=       slow_pointer.next
              return slow_pointer.data
          else:
              print('''No element found.'''			)
              return None


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













def   _A       (    SCREAMING_SNAKE_CASE__  :     int = 998001	):

    # fetches the next number
    for number in range(n - 1					,  9999					,  -1	):
        UpperCamelCase	:Union[str, Any]     							=       str(SCREAMING_SNAKE_CASE__	)

        # checks whether 'str_number' is a palindrome.
        if str_number == str_number[::-1]:
            UpperCamelCase	:Dict     							=       999

            # if 'number' is a product of two 3-digit numbers
            # then number is the answer otherwise fetch next number.
            while divisor != 99:
                if (number % divisor == 0) and (len(str(number // divisor	)	) == 3.0):
                    return number
                divisor -= 1
    raise ValueError('''That number is larger than our acceptable range.'''	)


if __name__ == "__main__":
 print(f'''{solution() = }''')





