Magic Trick solutions

Magic Trick was solved using Standard ML by 2 contestants. Solution sizes: average 1838 bytes (shortest: 1605; longest: 2072).