#include <bits/stdc++.h>
using namespace std;
string sortString(string& str) {
  sort(str.begin(), str.end());
  return str;
}
string operator*(const string& s, unsigned int n) {
  stringstream out;
  while (n--) out << s;
  return out.str();
}
int knapSack(int value[], int weight[], int w, int n) {
  if (w == 0 || n == 0) {
    return 0;
  }
  if (weight[n - 1] <= w) {
    return max(value[n - 1] + knapSack(value, weight, w - weight[n - 1], n - 1),
               knapSack(value, weight, w, n - 1));
  } else if (weight[n - 1] > w)
    return knapSack(value, weight, w, n - 1);
}
int ribbon(int n, int a, int b, int c) {
  int d = min(min(a, b), c);
  if (n == d) return 0;
}
void SieveOfEratosthenes(int n) {
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  for (int p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (int i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  for (int i = 2; i < n + 1; i++) {
    if (prime[i] == true) {
      cout << i << endl;
    }
  }
}
bool length_con(int n, int m, int k) {
  int d = 0;
  int sum = 0;
  while (n > 0) {
    int c = n % 10;
    sum += c;
    d++;
    n = n / 10;
  }
  if (sum == m && d == k) {
    return true;
  } else {
    return false;
  }
}
int min_arr(int arr[], int n) {
  int minim = 31;
  for (int i = 0; i < n; i++) {
    if (arr[i] < minim) {
      minim = i;
    }
  }
  return minim;
}
int max_arr(int arr[], int n) {
  int maxi = 0;
  for (int i = 0; i < n; i++) {
    if (arr[i] > maxi) {
      maxi = i;
    }
  }
  return maxi;
}
int sum(int arr[], int n) {
  int sum = 0;
  for (int i = 0; i < n; i++) {
    sum += arr[i];
  }
  return sum;
}
void sortEst() {
  int c, t;
  cin >> c >> t;
  double lo = 1;
  double hi = 2000000000;
  while (hi - lo > 0) {
    double mid = (lo + hi) / 2;
    double time = c * mid * log2(mid);
    if (t == time) {
      cout << mid << endl;
      break;
    } else if (t > time) {
      lo = mid;
    } else if (t < time) {
      hi = mid;
    }
  }
}
int ans[1000];
int tiles(int n) {
  ans[1] = 1;
  ans[2] = 2;
  for (int i = 3; i <= n; i++) {
    ans[i] = ans[i - 1] + ans[i - 2];
  }
  return ans[n];
}
int supw(int n, int arr[], int m) {
  if (m == n - 1) return arr[m];
  if (m == n - 2) return arr[m];
  if (m == n - 3) return arr[m];
  return min(arr[m] + supw(n, arr, m + 1),
             min(arr[m] + supw(n, arr, m + 2), arr[m] + supw(n, arr, m + 3)));
}
bool isSubsetSum(int set[], int n, int sum) {
  bool subset[n + 1][sum + 1];
  for (int i = 0; i <= n; i++) subset[i][0] = true;
  for (int i = 1; i <= sum; i++) subset[0][i] = false;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= sum; j++) {
      if (j < set[i - 1]) subset[i][j] = subset[i - 1][j];
      if (j >= set[i - 1])
        subset[i][j] = subset[i - 1][j] || subset[i - 1][j - set[i - 1]];
    }
  }
  return subset[n][sum];
}
bool equal_sum_partition(int arr[], int n, int sum) {
  if (n == 0 and sum != 0) return false;
  if (sum == 0) return true;
  if (arr[n - 1] > sum) return equal_sum_partition(arr, n - 1, sum);
  return equal_sum_partition(arr, n - 1, sum) ||
         equal_sum_partition(arr, n - 1, sum - arr[n - 1]);
}
int subset_count(int arr[], int n, int sum) {
  int subset[n + 1][sum + 1];
  memset(subset, 0, sizeof(subset));
  for (int i = 0; i <= n; i++) subset[i][0] = 1;
  for (int i = 1; i <= sum; i++) subset[0][i] = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= sum; j++) {
      if (j < arr[i - 1])
        subset[i][j] = subset[i - 1][j];
      else {
        subset[i][j] = subset[i - 1][j] + subset[i - 1][j - arr[i - 1]];
      }
    }
  }
  return subset[n][sum];
}
int find_min(int arr[], int n) {
  int diff = 100;
  int range = accumulate(arr, arr + n, 0);
  for (int i = 0; i <= range / 2; i++) {
    if (isSubsetSum(arr, n, i)) {
      diff = min(diff, range - 2 * i);
    }
  }
  return diff;
}
int unbounded_knapsack(int w, int value[], int weight[], int m) {
  if (m == 0 || w == 0) return 0;
  if (weight[m - 1] > w)
    return unbounded_knapsack(w, value, weight, m - 1);
  else
    return max(
        value[m - 1] + unbounded_knapsack(w - value[m - 1], value, weight, m),
        unbounded_knapsack(w, value, weight, m - 1));
}
int rod_cutting(int arr[], int n) {
  int dp[n + 1][n + 1];
  for (int i = 0; i < n + 1; i++) {
    for (int j = 0; j < n + 1; j++) {
      if (i == 0 || j == 0)
        dp[i][j] = 0;
      else if (i > j)
        dp[i][j] = dp[i - 1][j];
      else
        dp[i][j] = max(dp[i - 1][j], arr[i - 1] + dp[i][j - i]);
    }
  }
  return dp[n][n];
}
int coin_change_no_of_ways(int arr[], int n, int sum) {
  if (sum == 0) return 1;
  if (n <= 0 && sum > 0) return 0;
  if (arr[n - 1] > sum) return coin_change_no_of_ways(arr, n - 1, sum);
  return coin_change_no_of_ways(arr, n - 1, sum) +
         coin_change_no_of_ways(arr, n, sum - arr[n - 1]);
}
int maxSum(int arr[], int n, int k) {
  int res = 0;
  for (int i = 0; i < k; i++) res += arr[i];
  int idx = 0;
  int curr_sum = res;
  for (int i = k; i < n; i++) {
    curr_sum += arr[i] - arr[i - k];
    if (curr_sum < res) {
      idx = i;
    }
    res = min(res, curr_sum);
  }
  if (idx == 0) return 2;
  return idx;
}
int fact(int n) {
  if (n == 0 || n == 1) return 1;
  return n * fact(n - 1);
}
int pair_cal(int n) {
  if (n == 1) return 0;
  return (n - 1) + pair_cal(n - 1);
}
int most_repeating(int arr[], int n) {
  unordered_map<int, int> v;
  for (int i = 0; i < n; i++) {
    v[arr[i]] += 1;
  }
  int freq = -1;
  int res = 0;
  for (auto i : v) {
    if (i.second > freq) {
      freq = i.second;
      res = i.first;
    }
  }
  return res;
}
int get_smallest_divisor(int n) {
  if (n % 2 == 0)
    return 2;
  else {
    for (int i = 3; i * i <= n; i += 2) {
      if (n % i == 0) return i;
    }
  }
  return n;
}
void show_pq(priority_queue<int> pq) {
  priority_queue<int> g = pq;
  while (!g.empty()) {
    cout << g.top() << " ";
    g.pop();
  }
  cout << endl;
}
void pairsort(int a[], int b[], int n) {
  pair<int, int> pairt[n];
  for (int i = 0; i < n; i++) {
    pairt[i].first = a[i];
    pairt[i].second = b[i];
  }
  sort(pairt, pairt + n);
  for (int i = 0; i < n; i++) {
    a[i] = pairt[i].first;
    b[i] = pairt[i].second;
  }
}
void bin(unsigned n) {
  unsigned i;
  for (i = 1 << 31; i > 0; i = i / 2) (n & i) ? printf("1") : printf("0");
}
vector<pair<int, int>> find_sub_sum_0(int arr[], int n) {
  unordered_map<int, vector<int>> mp;
  vector<pair<int, int>> out;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    sum += arr[i];
    if (sum == 0) {
      out.push_back(make_pair(0, i));
    }
    if (mp.find(sum) != mp.end()) {
      vector<int> vc = mp[sum];
      for (auto it = vc.begin(); it != vc.end(); it++) {
      }
    }
  }
  return out;
}
int cnt[1000001];
int solve(int arr[], int n, int k, int z) {
  int dp[n + 1];
  dp[0] = 0, dp[1] = arr[0];
  for (int i = 2; i < n + 1; i++) {
    if (k == 0) {
      dp[i] = dp[i - 1];
      continue;
    }
    if (z == 0) {
      if (k > 0) {
        dp[i] = dp[i - 1] + arr[i - 1];
        k--;
      } else {
        dp[i] = dp[i - 1];
      }
    } else {
      dp[i] = max(dp[i - 1] + arr[i - 2], dp[i - 1] + arr[i - 1]);
      if (dp[i] == dp[i - 1] + arr[i - 2]) {
        z--;
      }
      k--;
    }
  }
  for (int i = 0; i < n + 1; i++) {
    cout << dp[i] << " ";
  }
  cout << endl;
  return dp[n];
}
bool cmp(pair<string, int>& a, pair<string, int>& b) {
  return a.second < b.second;
}
bool is_prime(int n) {
  if (n == 1) {
    return false;
  }
  int i = 2;
  while (i * i <= n) {
    if (n % i == 0) {
      return false;
    }
    i += 1;
  }
  return true;
}
int solve(long long arr[], long long n, long long sum) {
  vector<long long> a;
  if (sum % n) {
    sum -= n;
    long long cnter = 1;
    a.push_back(n);
    arr[n - 1] = -1;
    for (long long i = 1; sum > 0; i++) {
      sum -= i;
      a.push_back(i);
      arr[i - 1] = -1;
      if (sum == 0) break;
      sum -= n - i;
      a.push_back(n - i);
      arr[n - i - 1] = -1;
    }
    cout << a.size() << endl;
    for (auto i : a) cout << i << " ";
    cout << endl;
    cout << n - a.size() << endl;
    for (long long i = 0; i < n; i++) {
      if (arr[i] != -1) cout << arr[i] << " ";
    }
    cout << endl;
  } else {
    sum -= n;
    long long cnter = 1;
    a.push_back(n);
    arr[n - 1] = -1;
    for (long long i = 1; sum != 0; i++) {
      sum -= i;
      a.push_back(i);
      arr[i - 1] = -1;
      if (sum == 0) break;
      sum -= n - i;
      a.push_back(n - i);
      arr[n - i - 1] = -1;
    }
    cout << a.size() << endl;
    for (auto i : a) cout << i << " ";
    cout << endl;
    cout << n - a.size() << endl;
    for (long long i = 0; i < n; i++) {
      if (arr[i] != -1) cout << arr[i] << " ";
    }
    cout << endl;
  }
}
set<string> str;
void permute(string s, int l, int r) {
  if (l == r) {
    str.insert(s);
  } else {
    for (int i = l; i <= r; i++) {
      swap(s[i], s[l]);
      permute(s, l + 1, r);
      swap(s[i], s[l]);
    }
  }
}
int find_num(int n, int k) {
  int rem = (n + k) % k;
  if (rem == 0) return n;
  return n + k - rem;
}
int main() {
  int n, m, k, t;
  cin >> n >> m >> k >> t;
  vector<pair<int, int>> v;
  while (k--) {
    int a, b;
    cin >> a >> b;
    v.push_back({a, b});
  }
  map<int, string> mp;
  mp[1] = "Carrots", mp[2] = "Kiwis", mp[0] = "Grapes";
  while (t--) {
    int x, y;
    int cnt = 0;
    int flag = 0;
    cin >> x >> y;
    for (auto i : v) {
      if (i.first == x) {
        if (i.second == y) {
          cout << "Waste" << endl;
          flag = 1;
        } else {
          if (i.second < y) cnt++;
        }
      } else if (i.first < x)
        cnt++;
    }
    if (flag) continue;
    int z = (m * (x - 1)) + y - cnt;
    cout << mp[z % 3] << endl;
  }
}

### Prompt

Your challenge is to write a CPP solution to the following problem:

Fox Ciel saw a large field while she was on a bus. The field was a n × m rectangle divided into 1 × 1 cells. Some cells were wasteland, and other each cell contained crop plants: either carrots or kiwis or grapes. 

After seeing the field carefully, Ciel found that the crop plants of each cell were planted in following procedure:

  * Assume that the rows are numbered 1 to n from top to bottom and the columns are numbered 1 to m from left to right, and a cell in row i and column j is represented as (i, j). 
  * First, each field is either cultivated or waste. Crop plants will be planted in the cultivated cells in the order of (1, 1) → ... → (1, m) → (2, 1) → ... → (2, m) → ... → (n, 1) → ... → (n, m). Waste cells will be ignored. 
  * Crop plants (either carrots or kiwis or grapes) will be planted in each cell one after another cyclically. Carrots will be planted in the first cell, then kiwis in the second one, grapes in the third one, carrots in the forth one, kiwis in the fifth one, and so on. 



The following figure will show you the example of this procedure. Here, a white square represents a cultivated cell, and a black square represents a waste cell.

<image>

Now she is wondering how to determine the crop plants in some certain cells. 

Input

In the first line there are four positive integers n, m, k, t (1 ≤ n ≤ 4·104, 1 ≤ m ≤ 4·104, 1 ≤ k ≤ 103, 1 ≤ t ≤ 103), each of which represents the height of the field, the width of the field, the number of waste cells and the number of queries that ask the kind of crop plants in a certain cell.

Following each k lines contains two integers a, b (1 ≤ a ≤ n, 1 ≤ b ≤ m), which denotes a cell (a, b) is waste. It is guaranteed that the same cell will not appear twice in this section.

Following each t lines contains two integers i, j (1 ≤ i ≤ n, 1 ≤ j ≤ m), which is a query that asks you the kind of crop plants of a cell (i, j).

Output

For each query, if the cell is waste, print Waste. Otherwise, print the name of crop plants in the cell: either Carrots or Kiwis or Grapes.

Examples

Input

4 5 5 6
4 3
1 3
3 3
2 5
3 2
1 3
1 4
2 3
2 4
1 1
1 1


Output

Waste
Grapes
Carrots
Kiwis
Carrots
Carrots

Note

The sample corresponds to the figure in the statement.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
string sortString(string& str) {
  sort(str.begin(), str.end());
  return str;
}
string operator*(const string& s, unsigned int n) {
  stringstream out;
  while (n--) out << s;
  return out.str();
}
int knapSack(int value[], int weight[], int w, int n) {
  if (w == 0 || n == 0) {
    return 0;
  }
  if (weight[n - 1] <= w) {
    return max(value[n - 1] + knapSack(value, weight, w - weight[n - 1], n - 1),
               knapSack(value, weight, w, n - 1));
  } else if (weight[n - 1] > w)
    return knapSack(value, weight, w, n - 1);
}
int ribbon(int n, int a, int b, int c) {
  int d = min(min(a, b), c);
  if (n == d) return 0;
}
void SieveOfEratosthenes(int n) {
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  for (int p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (int i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  for (int i = 2; i < n + 1; i++) {
    if (prime[i] == true) {
      cout << i << endl;
    }
  }
}
bool length_con(int n, int m, int k) {
  int d = 0;
  int sum = 0;
  while (n > 0) {
    int c = n % 10;
    sum += c;
    d++;
    n = n / 10;
  }
  if (sum == m && d == k) {
    return true;
  } else {
    return false;
  }
}
int min_arr(int arr[], int n) {
  int minim = 31;
  for (int i = 0; i < n; i++) {
    if (arr[i] < minim) {
      minim = i;
    }
  }
  return minim;
}
int max_arr(int arr[], int n) {
  int maxi = 0;
  for (int i = 0; i < n; i++) {
    if (arr[i] > maxi) {
      maxi = i;
    }
  }
  return maxi;
}
int sum(int arr[], int n) {
  int sum = 0;
  for (int i = 0; i < n; i++) {
    sum += arr[i];
  }
  return sum;
}
void sortEst() {
  int c, t;
  cin >> c >> t;
  double lo = 1;
  double hi = 2000000000;
  while (hi - lo > 0) {
    double mid = (lo + hi) / 2;
    double time = c * mid * log2(mid);
    if (t == time) {
      cout << mid << endl;
      break;
    } else if (t > time) {
      lo = mid;
    } else if (t < time) {
      hi = mid;
    }
  }
}
int ans[1000];
int tiles(int n) {
  ans[1] = 1;
  ans[2] = 2;
  for (int i = 3; i <= n; i++) {
    ans[i] = ans[i - 1] + ans[i - 2];
  }
  return ans[n];
}
int supw(int n, int arr[], int m) {
  if (m == n - 1) return arr[m];
  if (m == n - 2) return arr[m];
  if (m == n - 3) return arr[m];
  return min(arr[m] + supw(n, arr, m + 1),
             min(arr[m] + supw(n, arr, m + 2), arr[m] + supw(n, arr, m + 3)));
}
bool isSubsetSum(int set[], int n, int sum) {
  bool subset[n + 1][sum + 1];
  for (int i = 0; i <= n; i++) subset[i][0] = true;
  for (int i = 1; i <= sum; i++) subset[0][i] = false;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= sum; j++) {
      if (j < set[i - 1]) subset[i][j] = subset[i - 1][j];
      if (j >= set[i - 1])
        subset[i][j] = subset[i - 1][j] || subset[i - 1][j - set[i - 1]];
    }
  }
  return subset[n][sum];
}
bool equal_sum_partition(int arr[], int n, int sum) {
  if (n == 0 and sum != 0) return false;
  if (sum == 0) return true;
  if (arr[n - 1] > sum) return equal_sum_partition(arr, n - 1, sum);
  return equal_sum_partition(arr, n - 1, sum) ||
         equal_sum_partition(arr, n - 1, sum - arr[n - 1]);
}
int subset_count(int arr[], int n, int sum) {
  int subset[n + 1][sum + 1];
  memset(subset, 0, sizeof(subset));
  for (int i = 0; i <= n; i++) subset[i][0] = 1;
  for (int i = 1; i <= sum; i++) subset[0][i] = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= sum; j++) {
      if (j < arr[i - 1])
        subset[i][j] = subset[i - 1][j];
      else {
        subset[i][j] = subset[i - 1][j] + subset[i - 1][j - arr[i - 1]];
      }
    }
  }
  return subset[n][sum];
}
int find_min(int arr[], int n) {
  int diff = 100;
  int range = accumulate(arr, arr + n, 0);
  for (int i = 0; i <= range / 2; i++) {
    if (isSubsetSum(arr, n, i)) {
      diff = min(diff, range - 2 * i);
    }
  }
  return diff;
}
int unbounded_knapsack(int w, int value[], int weight[], int m) {
  if (m == 0 || w == 0) return 0;
  if (weight[m - 1] > w)
    return unbounded_knapsack(w, value, weight, m - 1);
  else
    return max(
        value[m - 1] + unbounded_knapsack(w - value[m - 1], value, weight, m),
        unbounded_knapsack(w, value, weight, m - 1));
}
int rod_cutting(int arr[], int n) {
  int dp[n + 1][n + 1];
  for (int i = 0; i < n + 1; i++) {
    for (int j = 0; j < n + 1; j++) {
      if (i == 0 || j == 0)
        dp[i][j] = 0;
      else if (i > j)
        dp[i][j] = dp[i - 1][j];
      else
        dp[i][j] = max(dp[i - 1][j], arr[i - 1] + dp[i][j - i]);
    }
  }
  return dp[n][n];
}
int coin_change_no_of_ways(int arr[], int n, int sum) {
  if (sum == 0) return 1;
  if (n <= 0 && sum > 0) return 0;
  if (arr[n - 1] > sum) return coin_change_no_of_ways(arr, n - 1, sum);
  return coin_change_no_of_ways(arr, n - 1, sum) +
         coin_change_no_of_ways(arr, n, sum - arr[n - 1]);
}
int maxSum(int arr[], int n, int k) {
  int res = 0;
  for (int i = 0; i < k; i++) res += arr[i];
  int idx = 0;
  int curr_sum = res;
  for (int i = k; i < n; i++) {
    curr_sum += arr[i] - arr[i - k];
    if (curr_sum < res) {
      idx = i;
    }
    res = min(res, curr_sum);
  }
  if (idx == 0) return 2;
  return idx;
}
int fact(int n) {
  if (n == 0 || n == 1) return 1;
  return n * fact(n - 1);
}
int pair_cal(int n) {
  if (n == 1) return 0;
  return (n - 1) + pair_cal(n - 1);
}
int most_repeating(int arr[], int n) {
  unordered_map<int, int> v;
  for (int i = 0; i < n; i++) {
    v[arr[i]] += 1;
  }
  int freq = -1;
  int res = 0;
  for (auto i : v) {
    if (i.second > freq) {
      freq = i.second;
      res = i.first;
    }
  }
  return res;
}
int get_smallest_divisor(int n) {
  if (n % 2 == 0)
    return 2;
  else {
    for (int i = 3; i * i <= n; i += 2) {
      if (n % i == 0) return i;
    }
  }
  return n;
}
void show_pq(priority_queue<int> pq) {
  priority_queue<int> g = pq;
  while (!g.empty()) {
    cout << g.top() << " ";
    g.pop();
  }
  cout << endl;
}
void pairsort(int a[], int b[], int n) {
  pair<int, int> pairt[n];
  for (int i = 0; i < n; i++) {
    pairt[i].first = a[i];
    pairt[i].second = b[i];
  }
  sort(pairt, pairt + n);
  for (int i = 0; i < n; i++) {
    a[i] = pairt[i].first;
    b[i] = pairt[i].second;
  }
}
void bin(unsigned n) {
  unsigned i;
  for (i = 1 << 31; i > 0; i = i / 2) (n & i) ? printf("1") : printf("0");
}
vector<pair<int, int>> find_sub_sum_0(int arr[], int n) {
  unordered_map<int, vector<int>> mp;
  vector<pair<int, int>> out;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    sum += arr[i];
    if (sum == 0) {
      out.push_back(make_pair(0, i));
    }
    if (mp.find(sum) != mp.end()) {
      vector<int> vc = mp[sum];
      for (auto it = vc.begin(); it != vc.end(); it++) {
      }
    }
  }
  return out;
}
int cnt[1000001];
int solve(int arr[], int n, int k, int z) {
  int dp[n + 1];
  dp[0] = 0, dp[1] = arr[0];
  for (int i = 2; i < n + 1; i++) {
    if (k == 0) {
      dp[i] = dp[i - 1];
      continue;
    }
    if (z == 0) {
      if (k > 0) {
        dp[i] = dp[i - 1] + arr[i - 1];
        k--;
      } else {
        dp[i] = dp[i - 1];
      }
    } else {
      dp[i] = max(dp[i - 1] + arr[i - 2], dp[i - 1] + arr[i - 1]);
      if (dp[i] == dp[i - 1] + arr[i - 2]) {
        z--;
      }
      k--;
    }
  }
  for (int i = 0; i < n + 1; i++) {
    cout << dp[i] << " ";
  }
  cout << endl;
  return dp[n];
}
bool cmp(pair<string, int>& a, pair<string, int>& b) {
  return a.second < b.second;
}
bool is_prime(int n) {
  if (n == 1) {
    return false;
  }
  int i = 2;
  while (i * i <= n) {
    if (n % i == 0) {
      return false;
    }
    i += 1;
  }
  return true;
}
int solve(long long arr[], long long n, long long sum) {
  vector<long long> a;
  if (sum % n) {
    sum -= n;
    long long cnter = 1;
    a.push_back(n);
    arr[n - 1] = -1;
    for (long long i = 1; sum > 0; i++) {
      sum -= i;
      a.push_back(i);
      arr[i - 1] = -1;
      if (sum == 0) break;
      sum -= n - i;
      a.push_back(n - i);
      arr[n - i - 1] = -1;
    }
    cout << a.size() << endl;
    for (auto i : a) cout << i << " ";
    cout << endl;
    cout << n - a.size() << endl;
    for (long long i = 0; i < n; i++) {
      if (arr[i] != -1) cout << arr[i] << " ";
    }
    cout << endl;
  } else {
    sum -= n;
    long long cnter = 1;
    a.push_back(n);
    arr[n - 1] = -1;
    for (long long i = 1; sum != 0; i++) {
      sum -= i;
      a.push_back(i);
      arr[i - 1] = -1;
      if (sum == 0) break;
      sum -= n - i;
      a.push_back(n - i);
      arr[n - i - 1] = -1;
    }
    cout << a.size() << endl;
    for (auto i : a) cout << i << " ";
    cout << endl;
    cout << n - a.size() << endl;
    for (long long i = 0; i < n; i++) {
      if (arr[i] != -1) cout << arr[i] << " ";
    }
    cout << endl;
  }
}
set<string> str;
void permute(string s, int l, int r) {
  if (l == r) {
    str.insert(s);
  } else {
    for (int i = l; i <= r; i++) {
      swap(s[i], s[l]);
      permute(s, l + 1, r);
      swap(s[i], s[l]);
    }
  }
}
int find_num(int n, int k) {
  int rem = (n + k) % k;
  if (rem == 0) return n;
  return n + k - rem;
}
int main() {
  int n, m, k, t;
  cin >> n >> m >> k >> t;
  vector<pair<int, int>> v;
  while (k--) {
    int a, b;
    cin >> a >> b;
    v.push_back({a, b});
  }
  map<int, string> mp;
  mp[1] = "Carrots", mp[2] = "Kiwis", mp[0] = "Grapes";
  while (t--) {
    int x, y;
    int cnt = 0;
    int flag = 0;
    cin >> x >> y;
    for (auto i : v) {
      if (i.first == x) {
        if (i.second == y) {
          cout << "Waste" << endl;
          flag = 1;
        } else {
          if (i.second < y) cnt++;
        }
      } else if (i.first < x)
        cnt++;
    }
    if (flag) continue;
    int z = (m * (x - 1)) + y - cnt;
    cout << mp[z % 3] << endl;
  }
}

```