#pragma GCC optimize(2)
#include <bits/stdc++.h> 
#include <memory>
using namespace std;
#define sf(a) scanf("%d",&a)
#define pf(a) printf("%d",a)
#define ford(i,a,n) for(i=a;i<=n;i++)
#define forb(i,n,a) for(i=n;i>=a;i--)
#define mst(a,b) memset(a,b,sizeof(a))
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
#define pb push_back
#define ddd cout<<"ddd"<<endl
#define maxn 200010
#define pii pair<int,int>
#define inf 0x7fffffff
const ll mod=1e9+7;
int lowbit(int i)
{
	return i&-i;
}
int n;
int c[maxn];
int book[maxn];
int sum(int i)
{
	int ans=0;
	while(i)
	{
		ans+=c[i];
		i-=lowbit(i);
	}
	return ans;
}
void change(int i)
{
	while(i<=n)
	{
		c[i]++;
		i+=lowbit(i);
	}
}
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	//ddd;
	int t;
	cin>>n>>t;
	mst(book,-1);
	while(t--)
	{
		int l=1;
		int r=n;
		int k;
		cin>>k;
		while(l<r)
		{
			int mid=(l+r)>>1;
			int now;
			if(book[mid]==-1)
			{
				cout<<"? "<<1<<" "<<mid<<endl;
				cin>>now;
				if(now==mid)
				{
					int j;
					forb(j,mid,1)
					{
						if(book[j]==-1)
						{
							book[j]=j-sum(j);
						}
						else
						{
							if(book[j]+sum(j)==j)
							break;
						}
					}
				}
				else if(now==0)
				{
					int j;
					forb(j,mid,1)
					{
						if(book[j]==-1)
						book[j]=0;
						else
						break;
					}
				}
				else
				book[mid]=now-sum(mid);
				cout.flush();
			}
			else
			{
				now=book[mid]+sum(mid);
			}
			int temp=mid-now;
			if(temp<k)
			l=mid+1;
			else
			r=mid;
		}
		cout<<"! "<<l<<endl;
		change(l);
	}
}