Add magic trick solution in python