tushar gupta's submission of Doof on Cartesian | CodeChef