Chef and Secret Recipe (Lunchtime March)

Can anyone tell me how to solve this problem . I tried but not able to solve it .
Link - CodeChef: Practical coding for everyone