#include <iostream>
#include <string>
#include <typeinfo>

struct A
{
	virtual ~A() {}
	std::string GetFunnyName() {return typeid(*this).name();}
};

struct B: A {};
struct C: A {};

int main()
{
	A* o1 = new A;
	A* o2 = new B;
	A* o3 = new C;
	std::cout << o1->GetFunnyName() << '\n';
	std::cout << o2->GetFunnyName() << '\n';
	std::cout << o3->GetFunnyName() << '\n';
}
