#include <iostream>
class A {
public:
void virtual test() {
std::cout << "Lolka" << std::endl;
}
};
class B: public A {
public:
void virtual test() override {
std::cout << "Ne lolka" << std::endl;
}
};
int main(int argc, char **argv) {
B b;
static_cast<A>(b).test();
static_cast<B>(b).test();
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKY2xhc3MgQSB7CiAgcHVibGljOgogICAgdm9pZCB2aXJ0dWFsIHRlc3QoKSB7CiAgICAgICAgc3RkOjpjb3V0IDw8ICJMb2xrYSIgPDwgc3RkOjplbmRsOwogICAgfQp9OwoKY2xhc3MgQjogcHVibGljIEEgewogIHB1YmxpYzoKICAgIHZvaWQgdmlydHVhbCB0ZXN0KCkgb3ZlcnJpZGUgewogICAgICAgIHN0ZDo6Y291dCA8PCAiTmUgbG9sa2EiIDw8IHN0ZDo6ZW5kbDsKICAgIH0KfTsKCmludCBtYWluKGludCBhcmdjLCBjaGFyICoqYXJndikgewogICAgQiBiOwoKICAgIHN0YXRpY19jYXN0PEE+KGIpLnRlc3QoKTsKICAgIHN0YXRpY19jYXN0PEI+KGIpLnRlc3QoKTsKCiAgICByZXR1cm4gMDsKfQ==