solving ipmat indore question