solve a puzzle