#include<bits/stdc++.h>
using namespace std;
class A{
public:
void fun(){
cout<<"base ";
}
};
class B: public A{
public:
void fun(){
cout<<"derived ";
}
};
int main(){
A *a=new B;
a->fun();
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmNsYXNzIEF7CiAgICAgcHVibGljOgogICAgICAgICAgIHZvaWQgZnVuKCl7CiAgICAgICAgICAgICAgIGNvdXQ8PCJiYXNlICI7CiAgICAgICAgICB9Cn07CmNsYXNzIEI6IHB1YmxpYyBBewogICAgIHB1YmxpYzoKICAgICAgICAgIHZvaWQgZnVuKCl7CiAgICAgICAgICAgICAgIGNvdXQ8PCJkZXJpdmVkICI7CiAgICAgICAgICB9Cn07CmludCBtYWluKCl7CiAgICAgQSAqYT1uZXcgQjsKICAgICBhLT5mdW4oKTsKCiAgICAgcmV0dXJuIDA7Cn0=