#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define srep(i,s,t) for(int i = s; i < t; ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
#define yn {puts("Yes");}else{puts("No");}
#define MAX_N 200005

ll mod_pow(ll x, ll n, ll mod){ // x ^ n % mod
    ll res = 1;
    while(n > 0){
        if (n & 1) res = res * x % mod;
        x = x * x % mod;
        n >>= 1;
    }
    return res;
}

int ask(int a,int b,int c,int d){
	cout<<"? "<<a<<" "<<b<<" "<<c<<" "<<d<<"\n"<<flush;
	int res;
	cin>>res;
	return res;
}

ll h, w, n, K;
int a[55][55];

void dfs(int u, int d, int l, int r, int bomb){
    if(bomb == 0){
        srep(i,u,d){
            srep(j,l,r){
                a[i][j] = 0;
            }
        }
        return;
    }
    if(bomb == (d-u)*(r-l)){
        srep(i,u,d){
            srep(j,l,r){
                a[i][j] = 1;
            }
        }
        return;
    }

    if(d-u > r-l){
        int mh = (u+d)/2;
        int tmp = ask(u,l,mh-1,r-1);
        dfs(u,mh,l,r,tmp);
        dfs(mh,d,l,r,bomb-tmp);
    }else{
        int mw = (l+r)/2;
        int tmp = ask(u,l,d-1,mw-1);
        dfs(u,d,l,mw,tmp);
        dfs(u,d,mw,r,bomb-tmp);
    }

}

int main() {
    cin >> h >> w >> n >> K;
    rep(i,h)rep(j,w)a[i][j] = -1;

    int sol = 3;
    if(sol == 1){
        rep(i,h){
            rep(j,w){
                if(i%2==0&&j%2==0){
                    int res = ask(i,j,i+1,j+1);
                    if(res == 0){
                        a[i][j] = a[i][j+1] = a[i+1][j] = a[i+1][j+1] = 0;
                    }
                    if(res == 4){
                        a[i][j] = a[i][j+1] = a[i+1][j] = a[i+1][j+1] = 1;
                    }
                }
            }
        }
    }

    if(sol == 2){
        rep(i,h){
            rep(j,5){
                int bomb = ask(i,j*10,i,j*10+9);
                if(bomb == 0){
                    srep(k,j*10,j*10+9)a[i][k] = 0;
                    continue;
                }
                if(bomb == 1){
                    int l = 0, r = 10;
                    while(l+1 < r){
                        int m = (l+r)/2;
                        int tmp = ask(i,j*10+l,i,j*10+m-1);
                        if(tmp == 1) r = m;
                        else l = m;
                    }
                    srep(k,j*10,j*10+9)a[i][k] = 0;
                    a[i][j*10+l] = 1;
                    continue;
                }
                if(bomb >= 2){
                    srep(k,j*10,j*10+9){
                        if(bomb == 0){
                            a[i][k] = 0;
                        }else{
                            a[i][k] = ask(i,k,i,k);
                        }
                        bomb -= a[i][k];
                    }
                }
            }
        }
    }
        
    if(sol == 3){
        dfs(0,h,0,w,n);
    }
    



    // 愚直
    int cnt = 0;
    rep(i,h){
        rep(j,w){
            if(a[i][j] == 1){
                cnt++;
                if(cnt == n)break;
                continue;
            }
            if(a[i][j] == -1){
                cout << "? " << i << " " << j << " " << i << " " << j << endl << flush;
                int res;
                cin >> res;
                a[i][j] = res;
                cnt += a[i][j];
            }
            if(cnt == n)break;
        }
        if(cnt == n)break;
    }

    // ans出力
    ll ans = 0;
    rep(i,h){
        rep(j,w){
            if(a[i][j]==1)ans = (ans + mod_pow(2,i*w+j,K)) % K;
        }
    }
    cout << "! " << ans << endl << flush;
    return 0;
}




Measured memory_bytes: 3788