solve p3