solving P24