#include<bits/stdc++.h>
using namespace std;
#define int long long
#define inf (int)2e18
#define _ <<' '<<
#define nl endl
mt19937_64 rng(random_device{}());
int n;
int rint(){
return uniform_int_distribution<int>(1, n)(rng);
}
void solve(){
int m, k, q;
cin>>n>>m>>k>>q;
auto qry = [&](int x, int y, int z){
if(x < 1 or x > n or y < 1 or y > n or z < 1 or z > n) return 0ll;
cout<<"?" _ x _ y _ z<<nl;
cin>>x;
return x;
};
int cur = 0, x, y, z;
for(int i = 0; i < q/2; i++){
int qx = rint(), qy = rint(), qz = rint();
int qh = qry(qx, qy, qz);
if(cur < qh){
cur = qh;
x = qx;
y = qy;
z = qz;
}
}
auto f = [&](int nx, int ny, int nz){
int qh = qry(nx, ny, nz);
if(cur >= qh) return false;
x = nx;
y = ny;
z = nz;
return true;
};
while(1){
if(f(x-1, y, z)) continue;
if(f(x+1, y, z)) continue;
if(f(x, y-1, z)) continue;
if(f(x, y+1, z)) continue;
if(f(x, y, z-1)) continue;
if(f(x, y, z+1)) continue;
cout<<"!" _ x _ y _ z<<nl;
return;
}
}
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(NULL);cout.tie(NULL);
int t = 1;
//cin>>t;
while(t--) solve();
return 0;
}