Codechef uncle johny problem