Templates - three levels of inheritance