Qualification Round 2014, Problem A. Magic Trick

Judged response for input A-small: Correct!