apple pie's submission of Funny Hand | CodeChef