solve the 51 problem