Prasanth Reddy's submission of Q18 | CodeChef