istream& operator >> (istream& odkud, cplx& z)
{
    char c1, c2, c3;
    double re, im;
    odkud >> c1 >> re >> c2 >> im >> c3;
    if(odkud.good() && (c1 == '(') && (c2 == ',') && (c3 == ')'))
    {
        z.re = re;
        z.im = im;
    }
    else
        odkud.clear(ios_base::failbit);
    return odkud;
}
