#include <iostream>
using namespace std;

class A {
public:
          void m1() { cout << "a1"; }
  virtual void m2() { cout << "a2"; }
};

class B : public A {
  void m1() { cout << "b1"; }
  void m2() { cout << "b2"; }
};

int main() {
  A* x = new B();
  
  x->m1();
  cout << endl;
  
  x->m2();
  cout << endl;
}