Devesh Agarwal's submission of Reverse | CodeChef