#include <iostream>
struct A {
    bool f(A* a) { std::cout << "true "; return true; }
};
struct B : A {
    bool f(B* b) { std::cout << "false "; return false; }
};
int main() {
    A* a = new A();
    A* ab = new B();
    B* b = new B();
    a->f(a); a->f(ab); a->f(b); // true, true, true
    std::cout << std::endl;
    ab->f(a); ab->f(ab); ab->f(b); // true, true, true
    std::cout << std::endl;
    b->A::f(a); b->A::f(ab); b->f(b); // true true false
    std::cout << std::endl;
}