Adding solution to P2-9