add solutions to P31 and P39
add solutions to P26 and P32 to P35
add solution to P36 and P37
add solutions to P40