input: 
  class Vector3D:
      def __init__(self, x, y, z):
          """Constructor method for the Vector3D class, initializes the vector with three components x, y, and z.
          """
          self.x = x
          self.y = y
          self.z = z
      
      def __str__(self):
          """Returns a string representation of the Vector3D object in the form (x, y, z).
          >>> str(Vector3D(1, 2, 3))
          '(1, 2, 3)'
          """
          return "(" + str(self.x) + ", " + str(self.y) + ", " + str(self.z) + ")"
  
output:     
      def __add__(self, other):
          """Adds two Vector3D objects component-wise.
          >>> Vector3D(1, 2, 3) + Vector3D(4, 5, 6)
          (5, 7, 9)
          """
          return Vector3D(self.x + other.x, self.y + other.y, self.z + other.z)
  
      def __sub__(self, other):
          """Subtracts one Vector3D object from another component-wise.
          >>> Vector3D(1, 2, 3) - Vector3D(4, 5, 6)
          (-3, -3, -3)
          """
          return Vector3D(self.x - other.x, self.y - other.y, self.z - other.z)
  
      def __mul__(self, scalar):
          """Multiplies the Vector3D object by a scalar.
          >>> Vector3D(1, 2, 3) * 2
          (2, 4, 6)
          """
          return Vector3D(self.x * scalar, self.y * scalar, self.z * scalar)
  
      def __rmul__(self, scalar):
          """Multiplies the Vector3D object by a scalar (right multiplication).
          >>> 2 * Vector3D(1, 2, 3)
          (2, 4, 6)
          """
          return self.__mul__(scalar)
  
      def dot(self, other):
          """Computes the dot product of two Vector3D objects.
          >>> Vector3D(1, 2, 3).dot(Vector3D(4, 5, 6))
          32
          """
          return self.x * other.x + self.y * other.y + self.z * other.z
  
      def cross(self, other):
          """Computes the cross product of two Vector3D objects.
          >>> Vector3D(1, 2, 3).cross(Vector3D(4, 5, 6))
          (-3, 6, -3)
          """
          return Vector3D(self.y * other.z - self.z * other.y,
                          self.z * other.x - self.x * other.z,
                          self.x * other.y - self.y * other.x)
  
      def magnitude(self):
          """Computes the magnitude (length) of the Vector3D object.
          >>> Vector3D(1, 2, 2).magnitude()
          3.0
          """
          return (self.x ** 2 + self.y ** 2 + self.z ** 2) ** 0.5
  
      def normalize(self):
          """Normalizes the Vector3D object to a unit vector.
          >>> Vector3D(1, 2, 2).normalize()
          (0.3333333333333333, 0.6666666666666666, 0.6666666666666666)
          """
          mag = self.magnitude()
          return Vector3D(self.x / mag, self.y / mag, self.z / mag)
  