#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 rint(int x){
return uniform_int_distribution<int>(1, x)(rng);
}
void solve(){
int n, 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 > m or z < 1 or z > k) return 0ll;
cout<<"?" _ x _ y _ z<<nl;
cin>>x;
return x;
};
int cur = 0, x, y, z;
for(int i = 0; i < 1999; i++){
int qx = rint(n), qy = rint(m), qz = rint(k);
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;
cur = qh;
x = nx;
y = ny;
z = nz;
return true;
};
vector<int> steps = {1, 2, 3, 4, 5, 6};
while(1){
random_shuffle(steps.begin(), steps.end());
bool ok = 0;
for (int t: steps){
if(t == 1) {if(x-1, y, z) ok = 1;}
if(t == 2) {if(x+1, y, z) ok = 1;}
if(t == 3) {if(x, y-1, z) ok = 1;}
if(t == 4) {if(x, y+1, z) ok = 1;}
if(t == 5) {if(x, y, z-1) ok = 1;}
if(t == 6) {if(x, y, z+1) ok = 1;}
}
if(!ok) {
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;
}