def sqrt(x):
    """Square root of x; support complex numbers
    Examples:
    -------------
    >>> sqrt(4)
    2.0
    >>> sqrt(-1)
    1j
    >>> sqrt(0)
    0.0"""
    a = pow(x, 0.5)
    if isinstance(x, complex):
        return a
    elif x < 0:
        return complex(0, a.imag)
    else:
        return a.real