Code for Codechef problems