Let\'s say I have an abstract class
public abstract class Trainer{}
I have specific trainers like :
pub
I will post that for further consideration, even there is already accepted answer
If you read this question, consider using more loose coupled elements, with aggregation etc. instead of highly specific and complicated type hierarchy and generics.
With just plain aggregation you can achieve at least the same type & logical safety, but loose coupled design. Like I mentioned in comments:
Propably better will be more collections, agregations etc. to ensure type safety and elasticyty together (different trainers with different abilities to different animals in any combinations, including mixing, not locking a person to be a super-specific training master for some super specific abilities of specific animal and nothing more).
Of course I mean a "John than can teach horse to trot and a dog to bark", not "John that can teach horse or dog to trot or bark"