
from __future__ import annotations







class 							UpperCAmelCase	:

					def __init__(			self      :					int ,      lowerCAmelCase      :					int					):
											lowercase       :    int											=  data
											lowercase       :    Optional[Any]											=  None







class 							UpperCAmelCase	:

					def __init__(			self      :					int					):
											lowercase       :    Tuple											=  None

					def        _lowerCAmelCase	(			self      :					Union[str, Any] ,      lowerCAmelCase      :					int					):
											lowercase       :    Any											=  Node(lowerCAmelCase					)
											lowercase       :    Dict											=  self.head
											lowercase       :    Union[str, Any]											=  new_node
											return self.head.data




					def        _lowerCAmelCase	(			self      :					Any					):
											lowercase       :    Dict											=  self.head
											lowercase       :    str											=  self.head
											if self.head:
																	while fast_pointer and fast_pointer.next:
																							lowercase       :    List[Any]											=  fast_pointer.next.next
																							lowercase       :    Dict											=  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())




class 							UpperCAmelCase	:

					def __init__(			self      :					Any ,      lowerCAmelCase      :					int					):
											lowercase       :    Tuple											=  data
											lowercase       :    BinaryTreeNode | None											=  None
											lowercase       :    BinaryTreeNode | None											=  None





def        lowerCamelCase_      (			UpperCAmelCase_							:				BinaryTreeNode | None							,			UpperCAmelCase_							:				int       ):
						if node is None:
												lowercase       :    Union[str, Any]											=  BinaryTreeNode(UpperCAmelCase_       )
												return node

						# binary search tree is not empty,
						# so we will insert it into the tree
						# if new_value is less than value of data in node,
						#  add it to left subtree and proceed recursively
						if new_value < node.data:
												lowercase       :    List[Any]											=  insert(node.left_child							,			UpperCAmelCase_       )
						else:
												# if new_value is greater than value of data in node,
												#  add it to right subtree and proceed recursively
												lowercase       :    Dict											=  insert(node.right_child							,			UpperCAmelCase_       )
						return node

def        lowerCamelCase_      (			UpperCAmelCase_							:				None | BinaryTreeNode       ):  # if node is None,return
						if node:
												lowercase       :    Optional[Any]											=  inorder(node.left_child       )
												lowercase       :    Tuple											=  [*inorder_array, node.data]
												lowercase       :    Optional[Any]											=  inorder_array + inorder(node.right_child       )
						else:
												lowercase       :    Optional[int]											=  []
						return inorder_array

def        lowerCamelCase_      (			):
						lowercase       :    Any											=  insert(UpperCAmelCase_							,			15       )
						insert(UpperCAmelCase_							,			10       )
						insert(UpperCAmelCase_							,			25       )
						insert(UpperCAmelCase_							,			6       )
						insert(UpperCAmelCase_							,			14       )
						insert(UpperCAmelCase_							,			20       )
						insert(UpperCAmelCase_							,			60       )
						return root

def        lowerCamelCase_      (			):
						# main function
						lowercase       :    Any											=  make_tree()
						print('''Printing values of binary search tree in Inorder Traversal.'''       )
						inorder(UpperCAmelCase_       )


if __name__ == "__main__":
				import doctest

				doctest.testmod()
				main()


