#include <iostream>
using namespace std;

struct A { void test() { cout<<"A"<<endl; } };
struct B { void test() { cout<<"B"<<endl; } };

template<typename T>
void test(T & x)
{
	x.test();
}


int main()
{
	A a;
	test(a);
	
	B b;
	test(b);

	return 0;
}