Solution for p2