#include <iostream>
using namespace std;

struct base {
	static void talk() { cout << "hello" << endl; }
	static void shout() { cout << "HELLO!!" << endl; }
};

struct derived : public base {
	static void talk() { cout << "goodbye" << endl; }	
};

template < class T >
struct traits {
	static void talk() { T::talk(); }
	static void shout() { T::shout(); }
};

int main() {
	traits<base>::talk();
	traits<base>::shout();
	traits<derived>::talk();
	traits<derived>::shout();
	return 0;
}