#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 50;
ll d[maxn << 2];
int lowbit(int x){
    return x & (-x);
}
void update(int x, ll v){
    for(int i = x;i < maxn;i += lowbit(i)){
        d[i] += v;
    }
}
ll query(ll x){
    ll ans = 0;
    for(int i = x; i;i -= lowbit(i)){
        ans += d[i];
    }
    return ans;
}
ll c[maxn];
int main()
{
    std::ios::sync_with_stdio(false);
    int n, t, k;
    cin >> n >> t;
    for(int i = 1;i <= n;i++) c[i] = -1;
    while(t--){
        cin >> k;
        int l = 1, r = n;
        int ans = 0;
        while(l <= r){
            int mid = (l + r) >> 1;
            int sum;
            if(c[mid] != -1){
                sum = c[mid] + query(mid);
            }
            else{
                cout << "? " << 1 << " " << mid << endl;
                cin >> sum;
                c[mid] = sum - query(mid);
            }

            if(mid - sum >= k) r = mid - 1, ans = mid;
            else l = mid + 1;
        }
        cout << "! " << ans << endl;
        update(ans, 1);
    }

    return 0;
}
