#include <iostream>
using namespace std;
class A
{
public:
A() {};
void talk() { speak(); };
// void speak(){
// cout << "I am A\n";
// }
};
class B: public A
{
public:
B() {};
void speak(){
cout << "I am B\n";
};
//using A::talk;
};
B example;
int main() {
// your code goes here
example.speak();
example.talk();
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY2xhc3MgQQp7CglwdWJsaWM6CglBKCkge307Cgl2b2lkIHRhbGsoKSB7IHNwZWFrKCk7IH07Ci8vCXZvaWQgc3BlYWsoKXsKLy8JICBjb3V0IDw8ICJJIGFtIEFcbiI7Ci8vCX0KfTsKCmNsYXNzIEI6IHB1YmxpYyBBCnsKCXB1YmxpYzoKCUIoKSAge307Cgl2b2lkIHNwZWFrKCl7CgkJCgljb3V0IDw8ICJJIGFtIEJcbiI7Cgl9OwoJLy91c2luZyBBOjp0YWxrOwp9OwoKQiBleGFtcGxlOwoKaW50IG1haW4oKSB7CgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCglleGFtcGxlLnNwZWFrKCk7CglleGFtcGxlLnRhbGsoKTsKCXJldHVybiAwOwp9