

'''simple docstring'''

import json
import os
import tempfile

import datasets
from utils import generate_example_dataset, get_duration


a       :      Any  	=			50_00_00

a       :      int  	=			os.path.split(__file__)
a       :      Optional[Any]  	=			os.path.join(RESULTS_BASEPATH, "results", RESULTS_FILENAME.replace(".py", ".json"))





@get_duration
def 				lowercase (					__magic_name__							):



					'''simple docstring'''







					UpperCAmelCase		:							Tuple        =       dataset.select(range(0			,   len(A_							)			,   2							)							)





@get_duration
def 				lowercase (					__magic_name__							):



					'''simple docstring'''







					UpperCAmelCase		:							Any        =       dataset.sort("numbers"							)





@get_duration
def 				lowercase (					__magic_name__							):



					'''simple docstring'''







					UpperCAmelCase		:							Any        =       dataset.shuffle()





@get_duration
def 				lowercase (					__magic_name__							):



					'''simple docstring'''







					UpperCAmelCase		:							Optional[int]        =       dataset.train_test_split(0.1							)





@get_duration
def 				lowercase (					__magic_name__			,   __magic_name__=10							):



					'''simple docstring'''







					for shard_id in range(A_							):
										UpperCAmelCase		:							Optional[int]        =       dataset.shard(A_			,   A_							)





def 				lowercase (					):



					'''simple docstring'''







					UpperCAmelCase		:							Tuple        =       {"num examples": SPEED_TEST_N_EXAMPLES}
					UpperCAmelCase		:							Union[str, Any]        =       (select, sort, shuffle, train_test_split, shard)
					with tempfile.TemporaryDirectory() as tmp_dir:
										print("generating dataset"							)
										UpperCAmelCase		:							int        =       datasets.Features({"text": datasets.Value("string"							), "numbers": datasets.Value("float32"							)}							)
										UpperCAmelCase		:							Union[str, Any]        =       generate_example_dataset(
										    os.path.join(A_			,   "dataset.arrow"							)			,   A_			,   num_examples=A_							)
										print("Functions"							)
										for func in functions:
															print(func.__name__							)
															UpperCAmelCase		:							Union[str, Any]        =       func(A_							)

					with open(A_			,   "wb"							) as f:
										f.write(json.dumps(A_							).encode("utf-8"							)							)


if __name__ == "__main__":  # useful to run the profiler
				benchmark_indices_mapping()



'''simple docstring'''

from __future__ import annotations







class   UpperCamelCase__   :


		"""simple docstring"""

		def __init__(			self   ,      snake_case      ):


							'''simple docstring'''

							UpperCAmelCase		:							str        =       data
							UpperCAmelCase		:							Dict        =       None







class   UpperCamelCase__   :


		"""simple docstring"""

		def __init__(			self      ):


							'''simple docstring'''

							UpperCAmelCase		:							str        =       None







		def 				A_	(			self   ,      snake_case      ):


							'''simple docstring'''

							UpperCAmelCase		:							int        =       Node(snake_case      )
							UpperCAmelCase		:							Optional[int]        =       self.head
							UpperCAmelCase		:							Union[str, Any]        =       new_node
							return self.head.data







		def 				A_	(			self      ):


							'''simple docstring'''

							UpperCAmelCase		:							Dict        =       self.head
							UpperCAmelCase		:							str        =       self.head
							if self.head:
												while fast_pointer and fast_pointer.next:
																	UpperCAmelCase		:							List[str]        =       fast_pointer.next.next
																	UpperCAmelCase		:							Any        =       slow_pointer.next
												return slow_pointer.data
							else:
												print("No element found."      )
												return None


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