Problem: This is an interactive problem.

This is a hard version of the problem. The difference from the easy version is that in the hard version 1 ≤ t ≤ min(n, 10^4) and the total number of queries is limited to 6 ⋅ 10^4.

Polycarp is playing a computer game. In this game, an array consisting of zeros and ones is hidden. Polycarp wins if he guesses the position of the k-th zero from the left t times.

Polycarp can make no more than 6 ⋅ 10^4 requests totally of the following type: 

  * ? l r — find out the sum of all elements in positions from l to r (1 ≤ l ≤ r ≤ n) inclusive. 



To make the game more interesting, each guessed zero turns into one and the game continues on the changed array. More formally, if the position of the k-th zero was x, then after Polycarp guesses this position, the x-th element of the array will be replaced from 0 to 1.

Help Polycarp win the game.

Interaction

First, your program must read two integers n and t (1 ≤ n ≤ 2 ⋅ 10^5, 1 ≤ t ≤ min(n, 10^4)).

Then t lines follow, each of which contains one integer k (1 ≤ k ≤ n). It is guaranteed that at the moment of the request the array contains at least k zeros. In order to get the next value of k, you must output the answer for the previous value of k.

After that, you can make no more than 6 ⋅ 10^4 requests in total.

Use the following format to output the answer (it is not a request, it doesn't count in 6 ⋅ 10^4): 

  * ! x — position of the k-th zero. 



Positions in the array are numbered from left to right from 1 to n inclusive.

After printing t answers, your program should exit immediately.

In this task, the interactor is not adaptive. This means that within the same test, the hidden array and the queries do not change.

In case of an incorrect query, -1 will be displayed. When this value is received, your program must immediately exit normally (for example, by calling exit(0)), otherwise, the testing system may issue an arbitrary verdict.

If the number of requests is exceeded, the verdict wrong answer will be displayed.

Your solution may get the verdict Idleness limit exceeded if you don't print anything or forget to flush the output buffer.

To flush the output buffer, you need to do the following immediately after the query output and the end-of-line character:

  * fflush(stdout) or cout.flush() in C ++; 
  * System.out.flush() in Java; 
  * flush(output) in Pascal; 
  * stdout.flush() in Python; 
  * see the documentation for other languages. 



Hacks

Use the following format for hacks:

On the first line print the string s (1 ≤ |s| ≤ 2 ⋅ 10^5), consisting of zeros and ones, and an integer t (1 ≤ t ≤ min(|s|, 10^4)) — hidden array and number of requests, respectively. In the next t lines output the number k (1 ≤ k ≤ |s|).

The hacked solution will not have direct access to the hidden array.

Example

Input


6 2

2

2

1

1

0

1

0

Output


? 4 6

? 1 1

? 1 2

? 5 5

! 5

? 2 2

! 2

Note

In the first test, the array [1, 0, 1, 1, 0, 1] is hidden. After answering the query k=2, the array changed to [1, 0, 1, 1, 1, 1].

Solution (in CPP):

Solution:
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define PI 3.14159265

ll mod = 1000000007;
ll z   = 1000000000;
const ll N   = 1e5 + 1;
const ll INF = 1e18;
// ll mod = 998244353;


#define mp                make_pair
#define pb                push_back
#define ppb               pop_back
#define pf                push_front
#define ppf               pop_front
#define all(x)            (x).begin(),(x).end()
#define uniq(v)           (v).erase(unique(all(v)),(v).end())
#define sz(x)             (ll)((x).size())
#define fr                first
#define sc                second
#define pii               pair<ll,ll>
#define vi                vector<ll>
#define vvi               vector<vector<ll>>
#define vp                vector<pair<ll,ll>>
#define rep(i,a,b)        for(ll i=a;i<b;i++)
#define repr(i,a,b)       for(ll i=b-1;i>=a;i--)
#define mem1(a)           memset(a,-1,sizeof(a))
#define mem0(a)           memset(a,0,sizeof(a))
#define ppc               __builtin_popcount
#define ppcll             __builtin_popcountll

template<typename T, typename T1>T amax(T &a, T1 b) {if (b > a)a = b; return a;}
template<typename T, typename T1>T amin(T &a, T1 b) {if (b < a)a = b; return a;}

#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

// ll euclideandis(ll a, ll b)
// {
// 	return sqrt(a*a + b*b);
// }
// ll sumofdigit(ll a){ll final = 0;while(a){final += a%10;a = a/10;}return final;}

// bool cmp(const pair<ll,ll>& p1, const pair<ll,ll>& p2)
// {
// 	if(p1.first == p2.first)
// 	{
// 		return (p1.second > p2.second);
// 	}
// 	return (p1.first < p2.first);
// }

// int gcd(int a, int b)
// {
//     if (!a)
//        return b;
//     return gcd(b%a,a);
// }

//////////////////////////////////////////////////////////////////////Factorial and inverse modulo calc//////////////////////////////
// vector<ll> fact(1000001,0);
// fact[0] = 1;
// for(int i=1;i<=1000000;i++)
//     fact[i] = (fact[i-1]*i)%mod;

// vector<ll> inv(1000001,0);
// inv[0]=1;
// for(int i=1;i<=1000000;i++)
// {
//     inv[i]=(inv[i-1]*powe(i,mod-2))%mod;
// }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////exponential power calc////////////////////////////////////////
ll powe(ll x, ll y)
{
	if (y == 0) return 1;
	if (y == 1) return x;

	ll t = powe(x, y / 2);
	t = (t * t) % mod;

	if (y % 2 == 1) t = (t * x) % mod;

	return t;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////Fenwick Tree (BIT)(1-based)/////////////////////////////////////
// vi BIT; // set size for array
// ll get_sum(ll index) // returns sum of range 1 to index.(1 based indexing)
// {
// 	ll sum = 0;
// 	for(;index>0;index -= (index&-index))
// 	{
// 		sum += BIT[index];
// 	}
// 	return sum;
// }
// void update(ll index, ll val) // just updates , does not replace
// {
// 	for(;index<=n; index += (index&-index))
// 	{
// 		BIT[index] += val;
// 	}
// }

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////Fenwick Tree (BIT)(0-based)/////////////////////////////////////
// ll get(vi& BIT, ll index) // returns sum of range 0 to index-1.(0 based indexing)
// {
// 	ll sum = 0;
// 	for(;index>=0;index = (index & (index+1))-1)
// 	{
// 		sum += BIT[index];
// 	}
// 	return sum;
// }
// void update(vi& BIT, ll index, ll val) // just updates , does not replace
// {
// 	for(;index<BIT.size(); index |= (index+1))
// 	{
// 		BIT[index] += val;
// 	}
// }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////fibonacii//////////////////////////////////////////////////////////
// vi fib(100005);
// void fibo()
// {
// 	fib[0] = 1;fib[1] = 1;fib[2] = 2;
// 	for(int i=3;i<=10000;i++)
// 		fib[i] = (fib[i-1]%mod+fib[i-2]%mod)%mod;
// }
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////DFS, Dijkstra and calc of which path was travelled more////////////
// void DFS(pii end)
// {
// 	queue<pii> q;
// 	q.push(end);
// 	int movex[] = {1,0,-1,0};
// 	int movey[] = {0,1,0,-1};
// 	while(!q.empty())
// 	{
// 		pii p = q.front();
// 		q.pop();
// 		int x = p.fr;
// 		int y = p.sc;
// 		rep(i,0,4)
// 		{
// 			int X = x + movex[i];
// 			int Y = y + movey[i];
// 			if(X>=0 && X<r && Y>=0 && Y<c && !visited[X][Y] && a[X][Y] != 'T')
// 			{
// 				dist[X][Y] = min(dist[X][Y], dist[x][y] + 1);
// 				q.push(mp(X,Y));
// 			}
// 		}
// 	}
// }

// vector<bool> visited(N, false);
// vector<vector<pair<ll,ll>>> adj(N);
// vector<pair<ll,ll>> edges;
// vector<ll> dist(N,INT_MAX);
// void dijkstra(ll start, ll n)
// {
// 	set<pair<ll,ll>> s;
// 	s.insert(mp(0,start));
// 	while(!s.empty())
// 	{
// 		pii p = *s.begin();
// 		s.erase(s.begin());
// 		for(pii u:adj[p.sc])
// 		{
// 			ll to = u.fr;
// 			ll time = u.sc;
// 			if(dist[to] > dist[p.sc]+time)
// 			{
// 				s.erase({dist[to], to});
// 				dist[to] = dist[p.sc]+time;
// 				s.insert({dist[to], to});
// 			}
// 		}
// 	}
// }

// ll dfs(priority_queue<ll>& pq, vvi& adj, ll start, ll par)
// {
// 	ll sum = 1;
// 	for(auto u:adj[start])
// 	{
// 		if(u != par)
// 		{
// 			ll x = dfs(pq, adj, u, start);
// 			pq.push((adj.size()-x)*x);
// 			sum += x;
// 		}
// 	}
// 	return sum;
// }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////// DSU /////////////////////////////////////////////////////////////////

// void make_set(int v) {
//     parent[v] = v;
//     rank_[v] = 0;
// }

// int find_set(int v) {
//     if (v == parent[v])
//         return v;
//     return parent[v] = find_set(parent[v]);
// }

// void union_sets(int a, int b) {
//     a = find_set(a);
//     b = find_set(b);
//     if (a != b) {
//         if (rank_[a] < rank_[b])
//             swap(a, b);
//         parent[b] = a;
//         if (rank_[a] == rank_[b])
//             rank_[a]++;
//     }
// }

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////// segment tree, (l,r) queries from 0 to r-1, 0 based indexing ///////////////////
// struct segtree{
// 	ll size;
// 	vector<ll> segtree;

// 	void init(ll n)
// 	{
// 		size = 1;
// 		while(size<n)
// 		{
// 			size*=2;
// 		}
// 		segtree.assign(2*size,INT_MAX);
// 	}
// 	void build(vector<ll>& a, ll x, ll lx, ll rx)
// 	{
// 		if(rx-lx == 1)
// 		{
// 			if(lx < a.size())
// 			{
// 				segtree[x] = a[lx];
// 			}
// 			return;
// 		}
// 		ll mid = (lx+rx)/2;
// 		build(a,2*x+1,lx,mid);
// 		build(a,2*x+2,mid,rx);
// 		segtree[x] = min(segtree[2*x+1],segtree[2*x+2]);
// 	}
// 	void build(vector<ll>& a)
// 	{
// 		build(a,0,0,size);
// 	}
// 	ll query(ll l, ll r,ll x, ll lx, ll rx)
// 	{
// 		if(r<=lx || l>=rx)
// 			return INT_MAX;
// 		if(r>=rx && l<=lx)
// 			return segtree[x];
// 		ll m = (lx+rx)/2;
// 		ll left = query(l,r,2*x+1,lx,m);
// 		ll right = query(l,r,2*x+2,m,rx);
// 		return min(left,right);

// 	}
// 	ll query(ll l, ll r)
// 	{
// 		return query(l,r,0,0,size);
// 	}
// };
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

ll t, n, m;
ll maxi = 1e18;
int main()
{
// #ifndef ONLINE_JUDGE
// 	// for getting input from input.txt
// 	freopen("input.txt", "r", stdin);
// 	// for writing output to output.txt
// 	freopen("output.txt", "w", stdout);
// #endif
	fio;
	cin >> n >> t;
	ll cnt = 0;
	vi remain;
	rep(i, 1, n + 1)
	remain.pb(i);
	vi vals;
	vi store(200005, -1);
	set<ll> s2;
	while (t--)
	{
		ll k;
		cin >> k;
		ll ans = -1;
		ll left = 1, right = n;
		while (left <= right)
		{
			ll mid = (left + right) / 2;
			ll v;
			if (store[mid] == -1)
			{
				cout << "? " << 1 << " " << mid << endl;
				cin >> v;
				s2.insert(mid);
				store[mid] = v;
			}
			else
			{
				v = store[mid];
			}

			ll val = mid - v;
// 			cout<<" d" <<val<<" ";
			if (val >= k)
			{
				right = mid - 1;
			}
			else
			{
				left = mid + 1;
			}
		}
		for (auto it = s2.find(left); it != s2.end(); it++)
		{
			store[*it] += 1;
		}
		cout << "! " << left << endl;
	}
}