Querying on a Grid | CodeChef