Solution for the Zoo task from HackBulgaria.