how to solve logic puzzles using deductive reasoning