input: Write a function to create a class in Python that represents a complex number. The class should have an initialization method (__init__) that takes two parameters: real and imaginary, and a method (__str__) that returns a string representation of the complex number in the format "(real + imaginary)i".
  assert ComplexNumber(3, 4).__str__()=="(3 + 4i)"
  assert ComplexNumber(1, -1).__str__()=="(1 - 1i)"
  assert ComplexNumber(0, 7).__str__()=="(0 + 7i)"
  assert ComplexNumber(-5, 0).__str__()=="(-5 + 0i)"
  assert ComplexNumber(0, 0).__str__()=="(0 + 0i)"
output: class ComplexNumber:
      def __init__(self, real, imaginary):
          self.real = real
          self.imaginary = imaginary
  
      def __str__(self):
          if self.imaginary >= 0:
              return f"({self.real} + {self.imaginary}i)"
          else:
              return f"({self.real} - {-self.imaginary}i)"