






"""simple docstring"""



from __future__ import annotations





class  _UpperCAmelCase	:




					def __init__(    self					:						Tuple   ,						A					:						int       )  ->  None:
							lowercase_			:			Any								=       data
							lowercase_			:			Union[str, Any]								=       None





class  _UpperCAmelCase	:




					def __init__(    self					:						Any       )  ->  int:
							lowercase_			:			Dict								=       None




					def   A  (    self					:						Optional[Any]   ,						A					:						int       )  ->  int:
							lowercase_			:			List[Any]								=       Node(__snake_case       )
							lowercase_			:			Union[str, Any]								=       self.head
							lowercase_			:			Optional[int]								=       new_node
							return self.head.data






					def   A  (    self					:						int       )  ->  int | None:
							lowercase_			:			List[str]								=       self.head
							lowercase_			:			int								=       self.head
							if self.head:
									while fast_pointer and fast_pointer.next:
											lowercase_			:			Tuple								=       fast_pointer.next.next
											lowercase_			:			Optional[int]								=       slow_pointer.next
									return slow_pointer.data
							else:
									print('''No element found.'''       )
									return None


if __name__ == "__main__":
						__A		:	Tuple      =		LinkedList()
						for _ in range(int(input().strip())):
												__A		:	Union[str, Any]      =		int(input().strip())
												link.push(data)
						print(link.middle_element())











"""simple docstring"""



import math
import os

import cva
import numpy as np

__A		:	int      =		255.0



def 						lowercase   (    __snake_case    :			float		, __snake_case    :			float     ):
		lowercase_			:			Any								=       np.mean((original - contrast) ** 2     )
		if mse == 0:
				return 1_0_0

		return 2_0 * math.logaa(PIXEL_MAX / math.sqrt(__snake_case     )     )



def 						lowercase   (    ):
		lowercase_			:			Any								=       os.path.dirname(os.path.realpath(__snake_case     )     )
		# Loading images (original image and compressed image)
		lowercase_			:			Union[str, Any]								=       cva.imread(os.path.join(__snake_case		, '''image_data/original_image.png'''     )     )
		lowercase_			:			List[Any]								=       cva.imread(os.path.join(__snake_case		, '''image_data/compressed_image.png'''     )		, 1     )

		lowercase_			:			Tuple								=       cva.imread(os.path.join(__snake_case		, '''image_data/PSNR-example-base.png'''     )     )
		lowercase_			:			List[str]								=       cva.imread(
		    os.path.join(__snake_case		, '''image_data/PSNR-example-comp-10.jpg'''     )		, 1     )

		# Value expected: 29.73dB
		print('''-- First Test --'''     )
		print(F'''PSNR value is {peak_signal_to_noise_ratio(__snake_case		, __snake_case     )} dB'''     )

		# # Value expected: 31.53dB (Wikipedia Example)
		print('''\n-- Second Test --'''     )
		print(F'''PSNR value is {peak_signal_to_noise_ratio(__snake_case		, __snake_case     )} dB'''     )


if __name__ == "__main__":
						main()



