Gaaner Koli

Limits: 4s, 512 MB

The protagonists of this problem are two great programmers of a certain institution Omanush and OrdinarySheep. On a rainy weekend with nothing to do at hand, Omanush and OrdinarySheep became nostalgic and decided to play a game well known in Bangladesh as Gaaner Koli. But each of them knew songs from many languages other than Bengali, such as English, Bulgarian, Hindi, German and so on. With their vast knowledge, the game became quite unending and they got bored. Since they are problem solvers they quickly understood that they can create a program for optimal game play. They simplified the game in the following way.

This is a companion discussion topic for the original entry at