Sergey's submission of Dilemma | CodeChef