solving P10