solve P13