#include <iostream>
template <typename T>
struct ReIm
{
const ReIm* operator ->() const { return this; }
ReIm* operator ->() { return this; }
T re;
T im;
};
struct Cplx
{
double x;
double y;
ReIm<double> operator ->() const { return {x, y}; }
ReIm<double&> operator ->() { return {x, y}; }
};
int main() {
Cplx c{4, 5};
c->re = 42;
c->im = 51;
std::cout << c.x << " " << c.y << std::endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdGVtcGxhdGUgPHR5cGVuYW1lIFQ+CnN0cnVjdCBSZUltCnsKICAgIGNvbnN0IFJlSW0qIG9wZXJhdG9yIC0+KCkgY29uc3QgeyByZXR1cm4gdGhpczsgfQogICAgUmVJbSogb3BlcmF0b3IgLT4oKSB7IHJldHVybiB0aGlzOyB9CgogICAgVCByZTsKICAgIFQgaW07Cn07CgoKc3RydWN0IENwbHgKewogICAgZG91YmxlIHg7CiAgICBkb3VibGUgeTsKICAgIAogICAgUmVJbTxkb3VibGU+IG9wZXJhdG9yIC0+KCkgY29uc3QgeyByZXR1cm4ge3gsIHl9OyB9CiAgICBSZUltPGRvdWJsZSY+IG9wZXJhdG9yIC0+KCkgeyByZXR1cm4ge3gsIHl9OyB9Cn07CgppbnQgbWFpbigpIHsKICAgIENwbHggY3s0LCA1fTsKCiAgICBjLT5yZSA9IDQyOwogICAgYy0+aW0gPSA1MTsKICAgIAogICAgc3RkOjpjb3V0IDw8IGMueCA8PCAiICIgPDwgYy55IDw8IHN0ZDo6ZW5kbDsKfQo=