Dinesh Goyal's submission of Ancient Magic | CodeChef