#include <iostream>
using namespace std;
class CPerson{
public:
virtual void hello(){
cout<<"I'm a person"<<endl;
}
virtual void bye(){
cout<<"Bye, person"<<endl;
}
};
class CMan: public CPerson{
public:
void hello(){
cout<<"I'm a man"<<endl;
}
CMan(){
hello();
bye();
}
};
class CReek: public CMan{
public:
void hello(){
cout<<"I'm a reek"<<endl;
}
void bye(){
cout<<"Bye, reek"<<endl;
}
};
int main(){
CReek r;
return 0;
}