





import json
import os
import tempfile
import unittest

from transformers.modelcard import ModelCard



class 				_UpperCamelCase       (						unittest.TestCase  ):

       def lowercase			(		self:			Optional[Any]		)							->			Optional[int]:




              """simple docstring"""


              UpperCamelCase_ 							=	{
                  "model_details": {
                      "Organization": "testing",
                      "Model date": "today",
                      "Model version": "v2.1, Developed by Test Corp in 2019.",
                      "Architecture": "Convolutional Neural Network.",
                  },
                  "metrics": "BLEU and ROUGE-1",
                  "evaluation_data": {
                      "Datasets": {"BLEU": "My-great-dataset-v1", "ROUGE-1": "My-short-dataset-v2.1"},
                      "Preprocessing": "See details on https://arxiv.org/pdf/1810.03993.pdf",
                  },
                  "training_data": {
                      "Dataset": "English Wikipedia dump dated 2018-12-01",
                      "Preprocessing": (
                          "Using SentencePiece vocabulary of size 52k tokens. See details on"
                          " https://arxiv.org/pdf/1810.03993.pdf"
                      ),
                  },
                  "quantitative_analyses": {"BLEU": 55.1, "ROUGE-1": 76},
              }

       def lowercase			(		self:			Any		)							->			Dict:




              """simple docstring"""


              UpperCamelCase_ 							=	ModelCard.from_dict(self.inputs_dict		)
              self.assertTrue(hasattr(_SCREAMING_SNAKE_CASE       , "model_details"		)		)
              self.assertTrue(hasattr(_SCREAMING_SNAKE_CASE       , "intended_use"		)		)
              self.assertTrue(hasattr(_SCREAMING_SNAKE_CASE       , "factors"		)		)
              self.assertTrue(hasattr(_SCREAMING_SNAKE_CASE       , "metrics"		)		)
              self.assertTrue(hasattr(_SCREAMING_SNAKE_CASE       , "evaluation_data"		)		)
              self.assertTrue(hasattr(_SCREAMING_SNAKE_CASE       , "training_data"		)		)
              self.assertTrue(hasattr(_SCREAMING_SNAKE_CASE       , "quantitative_analyses"		)		)
              self.assertTrue(hasattr(_SCREAMING_SNAKE_CASE       , "ethical_considerations"		)		)
              self.assertTrue(hasattr(_SCREAMING_SNAKE_CASE       , "caveats_and_recommendations"		)		)

       def lowercase			(		self:			Optional[Any]		)							->			int:




              """simple docstring"""


              UpperCamelCase_ 							=	ModelCard.from_dict(self.inputs_dict		)
              UpperCamelCase_ 							=	json.loads(modelcard.to_json_string()		)
              for key, value in self.inputs_dict.items():
                     self.assertEqual(obj[key]       , _SCREAMING_SNAKE_CASE		)

       def lowercase			(		self:			int		)							->			Tuple:




              """simple docstring"""


              UpperCamelCase_ 							=	ModelCard.from_dict(self.inputs_dict		)

              with tempfile.TemporaryDirectory() as tmpdirname:
                     UpperCamelCase_ 							=	os.path.join(_SCREAMING_SNAKE_CASE       , "modelcard.json"		)
                     model_card_first.to_json_file(_SCREAMING_SNAKE_CASE		)
                     UpperCamelCase_ 							=	ModelCard.from_json_file(_SCREAMING_SNAKE_CASE		)

              self.assertEqual(model_card_second.to_dict()       , model_card_first.to_dict()		)



       def lowercase			(		self:			Optional[int]		)							->			int:




              """simple docstring"""


              UpperCamelCase_ 							=	ModelCard.from_dict(self.inputs_dict		)

              with tempfile.TemporaryDirectory() as tmpdirname:
                     model_card_first.save_pretrained(_SCREAMING_SNAKE_CASE		)
                     UpperCamelCase_ 							=	ModelCard.from_pretrained(_SCREAMING_SNAKE_CASE		)

              self.assertEqual(model_card_second.to_dict()       , model_card_first.to_dict()		)







from __future__ import annotations

class   UpperCAmelCase    :






   def __init__(						self :							List[Any]    ,       UpperCamelCase_ :							int  )->      None:
     _lowercase:			Optional[Any]      =     data
     _lowercase:			Optional[int]      =     None

class   UpperCAmelCase    :






   def __init__(						self :							Optional[Any]  )->      Union[str, Any]:
     _lowercase:			List[str]      =     None






   def 			_a    (						self :							List[Any]    ,       UpperCamelCase_ :							int  )->      int:
     _lowercase:			Any      =     Node(UpperCamelCase_  )
     _lowercase:			List[Any]      =     self.head
     _lowercase:			List[str]      =     new_node
     return self.head.data






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


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