
"""simple docstring"""
from __future__ import annotations

def 				lowercase      (_lowerCAmelCase				,  _lowerCAmelCase		):
						__lowerCAmelCase ,      __lowerCAmelCase ,      __lowerCAmelCase        =       """""", """""", """"""
						__lowerCAmelCase        =       []

						for character in message_part:
												tmp.append(character_to_number[character]		)

						for each in tmp:
												one += each[0]
												two += each[1]
												three += each[2]

						return one + two + three

def 				lowercase      (_lowerCAmelCase				,  _lowerCAmelCase		):
						__lowerCAmelCase ,      __lowerCAmelCase        =       """""", """"""
						__lowerCAmelCase        =       []

						for character in message_part:
												this_part += character_to_number[character]

						for digit in this_part:
												tmp += digit
												if len(_lowerCAmelCase		) == len(_lowerCAmelCase		):
																		result.append(_lowerCAmelCase		)
																		__lowerCAmelCase        =       """"""

						return result[0], result[1], result[2]

def 				lowercase      (_lowerCAmelCase				,  _lowerCAmelCase		):
						# Validate message and alphabet, set to upper and remove spaces
						__lowerCAmelCase        =       alphabet.replace(""" """				,  """"""		).upper()
						__lowerCAmelCase        =       message.replace(""" """				,  """"""		).upper()

						# Check length and characters
						if len(_lowerCAmelCase		) != 27:
												raise KeyError("""Length of alphabet has to be 27."""		)
						for each in message:
												if each not in alphabet:
																		raise ValueError("""Each message character has to be included in alphabet!"""		)

    # Generate dictionares
						__lowerCAmelCase        =       (
						    """111""",
						    """112""",
						    """113""",
						    """121""",
						    """122""",
						    """123""",
						    """131""",
						    """132""",
						    """133""",
						    """211""",
						    """212""",
						    """213""",
						    """221""",
						    """222""",
						    """223""",
						    """231""",
						    """232""",
						    """233""",
						    """311""",
						    """312""",
						    """313""",
						    """321""",
						    """322""",
						    """323""",
						    """331""",
						    """332""",
						    """333""",
						)
						__lowerCAmelCase        =       {}
						__lowerCAmelCase        =       {}
						for letter, number in zip(_lowerCAmelCase				,  _lowerCAmelCase		):
												__lowerCAmelCase        =       number
												__lowerCAmelCase        =       letter

						return message, alphabet, character_to_number, number_to_character

def 				lowercase      (_lowerCAmelCase				,  _lowerCAmelCase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ."				,  _lowerCAmelCase = 5		):
						__lowerCAmelCase ,      __lowerCAmelCase ,      __lowerCAmelCase ,      __lowerCAmelCase        =       __prepare(
						    _lowerCAmelCase				,  _lowerCAmelCase		)
						__lowerCAmelCase ,      __lowerCAmelCase        =       """""", """"""

						for i in range(0				,  len(_lowerCAmelCase		) + 1				,  _lowerCAmelCase		):
												encrypted_numeric += __encrypt_part(
												    message[i : i + period]				,  _lowerCAmelCase		)

						for i in range(0				,  len(_lowerCAmelCase		)				,  3		):
												encrypted += number_to_character[encrypted_numeric[i : i + 3]]

						return encrypted

def 				lowercase      (_lowerCAmelCase				,  _lowerCAmelCase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ."				,  _lowerCAmelCase = 5		):
						__lowerCAmelCase ,      __lowerCAmelCase ,      __lowerCAmelCase ,      __lowerCAmelCase        =       __prepare(
						    _lowerCAmelCase				,  _lowerCAmelCase		)
						__lowerCAmelCase        =       []
						__lowerCAmelCase        =       """"""

						for i in range(0				,  len(_lowerCAmelCase		) + 1				,  _lowerCAmelCase		):
												__lowerCAmelCase ,      __lowerCAmelCase ,      __lowerCAmelCase        =       __decrypt_part(message[i : i + period]				,  _lowerCAmelCase		)

												for j in range(0				,  len(_lowerCAmelCase		)		):
																		decrypted_numeric.append(a[j] + b[j] + c[j]		)

						for each in decrypted_numeric:
												decrypted += number_to_character[each]

						return decrypted


if __name__ == "__main__":
			SCREAMING_SNAKE_CASE_			      =					'''DEFEND THE EAST WALL OF THE CASTLE.'''
			SCREAMING_SNAKE_CASE_			      =					encrypt_message(msg, '''EPSDUCVWYM.ZLKXNBTFGORIJHAQ''')
			SCREAMING_SNAKE_CASE_			      =					decrypt_message(encrypted, '''EPSDUCVWYM.ZLKXNBTFGORIJHAQ''')
			print(F"Encrypted: {encrypted}\nDecrypted: {decrypted}")


"""simple docstring"""
from __future__ import annotations
class      lowerCAmelCase_						:



							'''simple docstring'''





							def __init__(				self  ,							snake_case_							)   ->       None:
													__lowerCAmelCase        =       data
													__lowerCAmelCase        =       None
class      lowerCAmelCase_						:



							'''simple docstring'''





							def __init__(				self							)   ->       List[str]:
													__lowerCAmelCase        =       None




							def  A__		(				self  ,							snake_case_							)   ->       int:
													__lowerCAmelCase        =       Node(snake_case_							)
													__lowerCAmelCase        =       self.head
													__lowerCAmelCase        =       new_node
													return self.head.data




							def  A__		(				self							)   ->       int | None:
													__lowerCAmelCase        =       self.head
													__lowerCAmelCase        =       self.head
													if self.head:
																			while fast_pointer and fast_pointer.next:
																									__lowerCAmelCase        =       fast_pointer.next.next
																									__lowerCAmelCase        =       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())
