





from __future__ import annotations

from typing import Any




class        _a    :

      """simple docstring"""


      def __init__(		self:			Tuple	,    __lowerCamelCase:			int = 6					):
          '''simple docstring'''


          UpperCamelCase__:	Node | None					=     None
          UpperCamelCase__:	Node | None					=     None
          self.create_linked_list(__lowerCamelCase					)






      def 			UpperCAmelCase_       (		self:			List[str]	,    __lowerCamelCase:			int					):
          '''simple docstring'''


          UpperCamelCase__:	str					=     Node()
          UpperCamelCase__:	Optional[Any]					=     current_node
          UpperCamelCase__:	Optional[int]					=     current_node
          UpperCamelCase__:	Tuple					=     current_node
          for _ in range(1	,    __lowerCamelCase					):
              UpperCamelCase__:	List[str]					=     Node()
              UpperCamelCase__:	Dict					=     current_node
              UpperCamelCase__:	Optional[int]					=     previous_node
              UpperCamelCase__:	int					=     current_node
          UpperCamelCase__:	Dict					=     self.front
          UpperCamelCase__:	List[str]					=     previous_node






      def 			UpperCAmelCase_       (		self:			List[Any]					):
          '''simple docstring'''


          return (
              self.front == self.rear
              and self.front is not None
              and self.front.data is None
          )






      def 			UpperCAmelCase_       (		self:			Union[str, Any]					):
          '''simple docstring'''


          self.check_can_perform_operation()
          return self.front.data if self.front else None






      def 			UpperCAmelCase_       (		self:			Any	,    __lowerCamelCase:			Any					):
          '''simple docstring'''


          if self.rear is None:
              return

          self.check_is_full()
          if not self.is_empty():
              UpperCamelCase__:	Optional[Any]					=     self.rear.next
          if self.rear:
              UpperCamelCase__:	str					=     data






      def 			UpperCAmelCase_       (		self:			Any					):
          '''simple docstring'''


          self.check_can_perform_operation()
          if self.rear is None or self.front is None:
              return None
          if self.front == self.rear:
              UpperCamelCase__:	Optional[int]					=     self.front.data
              UpperCamelCase__:	Dict					=     None
              return data

          UpperCamelCase__:	Tuple					=     self.front
          UpperCamelCase__:	Dict					=     old_front.next
          UpperCamelCase__:	str					=     old_front.data
          UpperCamelCase__:	List[Any]					=     None
          return data






      def 			UpperCAmelCase_       (		self:			Union[str, Any]					):
          '''simple docstring'''


          if self.is_empty():
              raise Exception("Empty Queue"					)






      def 			UpperCAmelCase_       (		self:			Any					):
          '''simple docstring'''


          if self.rear and self.rear.next == self.front:
              raise Exception("Full Queue"					)




class        _a    :

      """simple docstring"""


      def __init__(		self:			Dict					):
          '''simple docstring'''


          UpperCamelCase__:	Any | None					=     None
          UpperCamelCase__:	Node | None					=     None
          UpperCamelCase__:	Node | None					=     None


if __name__ == "__main__":
   import doctest

   doctest.testmod()








from __future__ import annotations

from collections import namedtuple



def 				lowerCAmelCase_ (							A_    ,A_    ,A_):
    UpperCamelCase__:	List[str]					=     namedtuple("result"    ,"name value")
    if (voltage, current, power).count(0) != 1:
        raise ValueError("Only one argument must be 0")
    elif power < 0:
        raise ValueError(
            "Power cannot be negative in any electrical/electronics system")
    elif voltage == 0:
        return result("voltage"    ,power / current)
    elif current == 0:
        return result("current"    ,power / voltage)
    elif power == 0:
        return result("power"    ,float(round(abs(voltage * current)    ,2)))
    else:
        raise ValueError("Exactly one argument must be 0")


if __name__ == "__main__":
   import doctest

   doctest.testmod()

