Solve p249