Solved the magic trick