Resul Hangeldiyev's submission of Story of Berland | CodeChef