Read the trick explanation and take a look to the code.