naveen's submission of A wolf, a sheep and cabbage | CodeChef