solve p4