Infinite Grid Game | CodeChef