



'''simple docstring'''






from __future__ import annotations



class 							lowercase :


 """simple docstring"""


 def __init__(							self						,a_							)	->     None:
        _UpperCAmelCase						:		str      =				data
        _UpperCAmelCase						:		Any      =				None







class 							lowercase :


 """simple docstring"""


 def __init__(							self							)	->     Union[str, Any]:
        _UpperCAmelCase						:		List[str]      =				None







 def _snake_case				(							self						,a_							)	->     int:
        _UpperCAmelCase						:		Tuple      =				Node(a_							)
        _UpperCAmelCase						:		Any      =				self.head
        _UpperCAmelCase						:		Tuple      =				new_node
        return self.head.data







 def _snake_case				(							self							)	->     int | None:
        _UpperCAmelCase						:		Union[str, Any]      =				self.head
        _UpperCAmelCase						:		Dict      =				self.head
        if self.head:
               while fast_pointer and fast_pointer.next:
                      _UpperCAmelCase						:		Tuple      =				fast_pointer.next.next
                      _UpperCAmelCase						:		Tuple      =				slow_pointer.next
               return slow_pointer.data
        else:
               print("""No element found."""							)
               return None


if __name__ == "__main__":
   A_							:				Optional[int]						=			LinkedList()
   for _ in range(int(input().strip())):
      A_							:				List[Any]						=			int(input().strip())
      link.push(data)
   print(link.middle_element())








'''simple docstring'''






def 					snake_case_      (  lowerCAmelCase_	)->	tuple[int, int]:





       '''simple docstring'''


       if len(lowerCAmelCase_	) == 1:
              return a[0], a[0]
       else:
              # split A into half.
              _UpperCAmelCase						:		Union[str, Any]      =				a[: len(lowerCAmelCase_	) // 2]
              _UpperCAmelCase						:		str      =				a[len(lowerCAmelCase_	) // 2 :]

              # 2 sub problems, 1/2 of original size.
              _UpperCAmelCase  ,_UpperCAmelCase						:		str      =				max_difference(lowerCAmelCase_	)
              _UpperCAmelCase  ,_UpperCAmelCase						:		List[str]      =				max_difference(lowerCAmelCase_	)

              # get min of first and max of second
              # linear time
              _UpperCAmelCase						:		Dict      =				min(lowerCAmelCase_	)
              _UpperCAmelCase						:		List[Any]      =				max(lowerCAmelCase_	)

              # 3 cases, either (small1, big1),
              # (min_first, max_second), (small2, big2)
              # constant comparisons
              if biga - smalla > max_second - min_first and biga - smalla > biga - smalla:
                     return smalla, biga
              elif biga - smalla > max_second - min_first:
                     return smalla, biga
              else:
                     return min_first, max_second


if __name__ == "__main__":
   import doctest

   doctest.testmod()



