func_code_string: #include <bits/stdc++.h>   using namespace std;   const int Maxn = 1000 + 10;   int n, m, k, t;   vector<pair<int, int> > w;   int main() {     cin >> n >> m >> k >> t;     for (int i = 0; i < k; i++) {       int f, s;       cin >> f >> s;       w.push_back(make_pair(f, s));     }     sort(w.begin(), w.end());     for (int i = 0; i < t; i++) {       int x, y;       cin >> x >> y;       pair<int, int> cell = make_pair(x, y);       int in = -2;       for (int j = 0; j < k; j++) {         if (cell == w[j]) {           in = -1;           break;         } else if (cell < w[j])           break;         else           in = j;       }       if (in == -1)         cout <<  Waste n ;       else {         int num = (x - 1) * m + (y - 1) - max(in + 1, 0);         if (num % 3 == 0)           cout <<  Carrots n ;         else if (num % 3 == 1)           cout <<  Kiwis n ;         else           cout <<  Grapes n ;       }     }   }   