#include #define rep(i,a,b) for (int i=a; i PII; typedef vector VI; typedef long long ll; typedef long double ld; int main () { ios_base::sync_with_stdio(false); int r,c,k,a,b; cin>>r>>c>>k; int M = 1e9+5; int t[4] = {M,M,M,M}; string l[4] = {"top", "bottom", "left", "right"}; for(int i=0;i>a>>b; t[0] = min(t[0], a-1); t[1] = min(t[1], r - a); t[2] = min(t[2], b-1); t[3] = min(t[3], c - b); } int val = t[0]^t[1]^t[2]^t[3], x; if(val == 0){ cout<<"pass\n"; fflush(stdout); string a; cin>>a; if(a[0] == 'y') return 0; cin>>x; if(a[0] == 't') t[0] -= x; if(a[0] == 'b') t[1] -= x; if(a[0] == 'l') t[2] -= x; if(a[0] == 'r') t[3] -= x; } while(true){ val = t[0]^t[1]^t[2]^t[3]; //cout<= 0){ t[i]^=val; cout<>a; if(a[0] == 'y') return 0; cin>>x; if(a[0] == 't') t[0] -= x; if(a[0] == 'b') t[1] -= x; if(a[0] == 'l') t[2] -= x; if(a[0] == 'r') t[3] -= x; } }