#include <iostream>
using namespace std;
class MyClass {
int x;
public:
MyClass(int a) { x = a; };
void method(MyClass &m);
};
void MyClass::method(MyClass &m){
cout << "self.x = " << x << "; m.x = " << m.x << endl;
}
int main() {
MyClass o1(5);
MyClass o2(10);
o1.method(o2);
o2.method(o1);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY2xhc3MgTXlDbGFzcyB7CglpbnQgeDsKcHVibGljOgoJTXlDbGFzcyhpbnQgYSkgeyB4ID0gYTsgfTsKCXZvaWQgbWV0aG9kKE15Q2xhc3MgJm0pOwp9OwoKdm9pZCBNeUNsYXNzOjptZXRob2QoTXlDbGFzcyAmbSl7Cgljb3V0IDw8ICJzZWxmLnggPSAiIDw8IHggPDwgIjsgbS54ID0gIiA8PCBtLnggPDwgZW5kbDsKfQoKaW50IG1haW4oKSB7CglNeUNsYXNzIG8xKDUpOwoJTXlDbGFzcyBvMigxMCk7CgkKCW8xLm1ldGhvZChvMik7CglvMi5tZXRob2QobzEpOwoJCglyZXR1cm4gMDsKfQ==