


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



class      _UpperCAmelCase					:






		'''simple docstring'''

		def __init__(self							,			a_   ):





			'''simple docstring'''

			__snake_case      :		List[str]         =							data
			__snake_case      :		List[str]         =							None



class      _UpperCAmelCase					:






		'''simple docstring'''

		def __init__(self   ):





			'''simple docstring'''

			__snake_case      :		List[Any]         =							None



		def 							SCREAMING_SNAKE_CASE    (self							,			a_   ):





			'''simple docstring'''

			__snake_case      :		Optional[Any]         =							Node(a_   )
			__snake_case      :		str         =							self.head
			__snake_case      :		str         =							new_node
			return self.head.data



		def 							SCREAMING_SNAKE_CASE    (self   ):





			'''simple docstring'''

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


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






import unittest
from pathlib import Path

from transformers import is_vision_available, load_tool
from transformers.testing_utils import get_tests_dir

from .test_tools_common import ToolTesterMixin


if is_vision_available():
      from PIL import Image



class     snake_case_			(						unittest.TestCase    ,__A			):






   def  __UpperCamelCase	( self							:	int    )   ->		Union[str, Any]:
       lowercase__					:  Any          =							load_tool("image-segmentation"    )
       self.tool.setup()
       lowercase__					:  Optional[int]          =							load_tool("image-segmentation"      ,		remote=lowercase_    )






   def  __UpperCamelCase	( self							:	Any    )   ->		Tuple:
       lowercase__					:  Any          =							Image.open(Path(get_tests_dir("fixtures/tests_samples/COCO"    )    ) / "000000039769.png"    )
       lowercase__					:  Tuple          =							self.tool(lowercase_      ,		"cat"    )
       self.assertTrue(isinstance(lowercase_      ,		Image.Image    )    )






   def  __UpperCamelCase	( self							:	Optional[int]    )   ->		Dict:
       lowercase__					:  List[Any]          =							Image.open(Path(get_tests_dir("fixtures/tests_samples/COCO"    )    ) / "000000039769.png"    )
       lowercase__					:  Optional[int]          =							self.remote_tool(lowercase_      ,		"cat"    )
       self.assertTrue(isinstance(lowercase_      ,		Image.Image    )    )






   def  __UpperCamelCase	( self							:	List[Any]    )   ->		Dict:
       lowercase__					:  Optional[Any]          =							Image.open(Path(get_tests_dir("fixtures/tests_samples/COCO"    )    ) / "000000039769.png"    )
       lowercase__					:  int          =							self.tool(image=lowercase_      ,		label="cat"    )
       self.assertTrue(isinstance(lowercase_      ,		Image.Image    )    )







   def  __UpperCamelCase	( self							:	Dict    )   ->		List[Any]:
       lowercase__					:  Tuple          =							Image.open(Path(get_tests_dir("fixtures/tests_samples/COCO"    )    ) / "000000039769.png"    )
       lowercase__					:  Union[str, Any]          =							self.remote_tool(image=lowercase_      ,		label="cat"    )
       self.assertTrue(isinstance(lowercase_      ,		Image.Image    )    )



