



'''simple docstring'''

from __future__ import annotations

class 			__magic_name__		:







							def __init__(							self      : Optional[int]			,_UpperCAmelCase      : int	):
									_a  :   int				 =							data
									_a  :   Optional[int]				 =							None

class 			__magic_name__		:







							def __init__(							self      : Tuple	):
									_a  :   Tuple				 =							None







							def 							__lowercase    (							self      : List[Any]			,_UpperCAmelCase      : int	):
									_a  :   List[Any]				 =							Node(_UpperCAmelCase	)
									_a  :   Optional[Any]				 =							self.head
									_a  :   str				 =							new_node
									return self.head.data







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


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









'''simple docstring'''

def   __lowerCamelCase  (   lowerCAmelCase_						)    ->   tuple[int, int]:
		# base case
		if len(lowerCAmelCase_						) == 1:
				return a[0], a[0]
		else:
				# split A into half.
				_a  :   Union[str, Any]				 =							a[: len(lowerCAmelCase_						) // 2]
				_a  :   List[Any]				 =							a[len(lowerCAmelCase_						) // 2 :]

				# 2 sub problems, 1/2 of original size.
				_a ,      _a  :   Any				 =							max_difference(lowerCAmelCase_						)
				_a ,      _a  :   Any				 =							max_difference(lowerCAmelCase_						)

				# get min of first and max of second
				# linear time
				_a  :   Union[str, Any]				 =							min(lowerCAmelCase_						)
				_a  :   Optional[int]				 =							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()




