func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, m, h, t, r, x, y, dis[210][210], h1[210], t1[210], h2[210], t2[210],       bfs[210 * 210][2], L, R;   void renew(int x, int y, int v) {     if (x + y > r) return;     if (dis[x][y] == -1) {       dis[x][y] = v;       bfs[++R][0] = x;       bfs[R][1] = y;     }   }   int dfs(int x, int y) {     if (x + y > r) return 0;     int i, p = 1;     if (dis[x][y] == -1) {       printf( Draw n );       exit(0);     }     if (dis[x][y]) return dis[x][y];     dis[x][y] = -1;     for (i = 1; i <= n && i <= x; ++i)       p = max(p, dfs(x - i + h1[i], y + t1[i]) + 1);     for (i = 1; i <= m && i <= y; ++i)       p = max(p, dfs(x + h2[i], y - i + t2[i]) + 1);     dis[x][y] = p;     return p;   }   int main() {     int i;     scanf( %d%d%d , &h, &t, &r);     scanf( %d , &n);     for (i = 1; i <= n; ++i) scanf( %d%d , &h1[i], &t1[i]);     scanf( %d , &m);     for (i = 1; i <= m; ++i) scanf( %d%d , &h2[i], &t2[i]);     memset(dis, -1, sizeof(dis));     dis[h][t] = 0;     bfs[L = R = 1][0] = h;     bfs[1][1] = t;     while (L <= R) {       x = bfs[L][0];       y = bfs[L++][1];       for (i = 1; i <= n && i <= x; ++i)         renew(x - i + h1[i], y + t1[i], dis[x][y] + 1);       for (i = 1; i <= m && i <= y; ++i)         renew(x + h2[i], y - i + t2[i], dis[x][y] + 1);     }     if (dis[0][0] != -1) return printf( Ivan n%d n , dis[0][0]), 0;     memset(dis, 0, sizeof(dis));     printf( Zmey n%d n , dfs(h, t));   }   