Solution P1 to P10