#include<bits/stdc++.h>
using namespace std;
#define ll long long
map<pair<int,int>,int> mp;
 
void upd(int pos,int l,int r){
	mp[{l,r}]--;
	if(l<r){
		int mid=(l+r)/2;
		if(pos<=mid){
			upd(pos,l,mid);
		}else{
			upd(pos,mid+1,r);
		}
	}
}
 
signed main(){
	int n,t;cin>>n>>t;
	
	while(t--){
		int k,x;cin>>k;
		int l=1,r=n;
		
		
		while(l<r){
			int mid=(l+r)/2;
			if(mp.count({l,mid})==0){
				cout<<"? "<<l<<" "<<mid<<endl;
				cin>>x;
				mp[{l,mid}]=mid-l+1-x;
			}
			x=mp[{l,mid}];
			if(k<=x){
				r=mid;
			}else{
				k-=x;
				l=mid+1;
			}
		}
		cout<<"! "<<l<<endl;
		upd(l,1,n);
	}
 
 
 
 
	return 0;
}