logical deduction magic