Magic Trick solutions

Magic Trick was solved using PowerShell by 4 contestants. Solution sizes: average 1078 bytes (shortest: 667; longest: 1502).