Week 18 class; made AOPSTree generic.