solve P17