#include <bits/stdc++.h>
using namespace std;
#define PI 3.14159265358979323
#define ll long long int
#define vi vector <int>
#define vl vector <ll>
#define all(v) (v).begin(),(v).end()
#define pb push_back
#define ff first
#define ss second
#define MOD 1000000007
ll power(ll a, ll b) { //a^b
	ll res = 1;
	a = a % MOD;
	while (b > 0) {
		if (b & 1) {res = (res * a) % MOD; b--;}
		a = (a * a) % MOD;
		b >>= 1;
	}
	return res;
}

ll gcd(ll a, ll b) {return (b == 0) ? a : gcd(b, a % b);}

vl tree(1000005, 0);

ll sum(ll tl, ll tr, ll l, ll r, ll v) {
	if (l > r)
		return 0;
	ll mid = tl + (tr - tl) / 2;
	if (tl == l && tr == r)
		return tree[v];
	return sum(tl, mid, l, min(mid, r), 2 * v) + sum(mid + 1, tr, max(mid + 1, l), r, 2 * v + 1);
}

void update(ll l, ll r, ll pos, ll val, ll v) {
	if (l == r) {
		tree[v] = val;
	}
	else {
		ll mid = l + (r - l) / 2;
		if (pos <= mid)
			update(l, mid, pos, val, 2 * v);
		else
			update(mid + 1, r, pos, val, 2 * v + 1);
		tree[v] = tree[2 * v] + tree[2 * v + 1];
	}
}

ll q = 0;

int main() {
	ll n, t;
	cin >> n >> t;
	vl ans(n + 1, -1);
	vl hav(n + 1, -1);
	while (t--) {
		ll k;
		cin >> k;
		ll l = 1, r = n;
		ll val;
		while (l <= r) {
			ll mid = l + (r - l) / 2;
			ll x;
			if (ans[mid] == -1) {
				assert(q <= 6 * 10000);
				cout << "? " << 1 << " " << mid << endl;

				cin >> x;
				q++;
				ans[mid] = x;
				ll z = sum(1, n, 1, mid, 1);
				hav[mid] = z;
			}
			else {
				ll z = sum(1, n, 1, mid, 1);
				x = ans[mid] + z - hav[mid];
			}
			ll zeros = mid - x;
			if (zeros >= k) {
				val = mid;
				r = mid - 1;
			}
			else
				l = mid + 1;
		}
		cout << "! " << val << endl;
		update(1, n, val, 1, 1);
	}
}
