prashant's submission of Doof on Cartesian | CodeChef