#include <iostream>
using namespace std;
class Father {
public:
void start () {
this->init();
};
virtual void init () {
cout << "I'm the father" << endl;
};
};
class Child: public Father {
void init () override {
cout << "I'm the child" << endl;
};
};
int main (int argc, char** argv) {
Child child;
child.start();
}
ICAgICNpbmNsdWRlIDxpb3N0cmVhbT4KCiAgICB1c2luZyBuYW1lc3BhY2Ugc3RkOwoKICAgIGNsYXNzIEZhdGhlciB7CiAgICAgICAgcHVibGljOgogICAgICAgICAgICB2b2lkIHN0YXJ0ICgpIHsKICAgICAgICAgICAgICAgIHRoaXMtPmluaXQoKTsKICAgICAgICAgICAgfTsKCiAgICAgICAgICAgIHZpcnR1YWwgdm9pZCBpbml0ICgpIHsKICAgICAgICAgICAgICAgIGNvdXQgPDwgIkknbSB0aGUgZmF0aGVyIiA8PCBlbmRsOwogICAgICAgICAgICB9OwogICAgfTsKCiAgICBjbGFzcyBDaGlsZDogcHVibGljIEZhdGhlciB7CiAgICAgICAgdm9pZCBpbml0ICgpIG92ZXJyaWRlIHsKICAgICAgICAgICAgY291dCA8PCAiSSdtIHRoZSBjaGlsZCIgPDwgZW5kbDsKICAgICAgICB9OwogICAgfTsKCiAgICBpbnQgbWFpbiAoaW50IGFyZ2MsIGNoYXIqKiBhcmd2KSB7CiAgICAgICAgQ2hpbGQgY2hpbGQ7CiAgICAgICAgY2hpbGQuc3RhcnQoKTsKICAgIH0=