Karthik's submission of Coloring the Grid | CodeChef