input: 
  class Vector3D:
      def __init__(self, x: float, y: float, z: float):
          """Initialize a 3D vector with x, y, and z components.
          >>> v1 = Vector3D(1, 2, 3)
          >>> str(v1)
          '(1, 2, 3)'
          """
          self.x = x
          self.y = y
          self.z = z
      
      def __str__(self) -> str:
          """Return a string representation of the vector in the form (x, y, z).
          >>> v1 = Vector3D(1, 2, 3)
          >>> str(v1)
          '(1, 2, 3)'
          """
          return "(" + str(self.x) + ", " + str(self.y) + ", " + str(self.z) + ")"
  
output:     
      def __add__(self, other: 'Vector3D') -> 'Vector3D':
          """Add two vectors and return the resulting vector.
          >>> v1 = Vector3D(1, 2, 3)
          >>> v2 = Vector3D(4, 5, 6)
          >>> v3 = v1 + v2
          >>> str(v3)
          '(5, 7, 9)'
          """
          return Vector3D(self.x + other.x, self.y + other.y, self.z + other.z)
  
      def __sub__(self, other: 'Vector3D') -> 'Vector3D':
          """Subtract one vector from another and return the resulting vector.
          >>> v1 = Vector3D(1, 2, 3)
          >>> v2 = Vector3D(4, 5, 6)
          >>> v3 = v1 - v2
          >>> str(v3)
          '(-3, -3, -3)'
          """
          return Vector3D(self.x - other.x, self.y - other.y, self.z - other.z)
  
      def __mul__(self, scalar: float) -> 'Vector3D':
          """Multiply the vector by a scalar and return the resulting vector.
          >>> v1 = Vector3D(1, 2, 3)
          >>> v2 = v1 * 2
          >>> str(v2)
          '(2, 4, 6)'
          """
          return Vector3D(self.x * scalar, self.y * scalar, self.z * scalar)
  
      def __rmul__(self, scalar: float) -> 'Vector3D':
          """Multiply the vector by a scalar and return the resulting vector.
          >>> v1 = Vector3D(1, 2, 3)
          >>> v2 = 2 * v1
          >>> str(v2)
          '(2, 4, 6)'
          """
          return self.__mul__(scalar)
  
      def __eq__(self, other: 'Vector3D') -> bool:
          """Check if two vectors are equal.
          >>> v1 = Vector3D(1, 2, 3)
          >>> v2 = Vector3D(1, 2, 3)
          >>> v1 == v2
          True
          >>> v3 = Vector3D(4, 5, 6)
          >>> v1 == v3
          False
          """
          return self.x == other.x and self.y == other.y and self.z == other.z
  