//ダニヤ

// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
// int id = uniform_int_distribution<int>(l, r)(rng);
// result -= result / i;
// ll res = h[r] - (h[l - 1] * pw[r - l + 1]) % mod;
#include <bits/stdc++.h>

using namespace std;

#define khan ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define ll long long
#define pii pair < int, int >
#define pb push_back

const int N = 2e5 + 5, mod = 998244353, INF = 1e9 + 7;

const ll BIG = 1e18;

const int block = 316;

int n, q, k, ans[N], t[N * 4][2];

void update(int v, int l, int r, int pos, int type){
    if(l == r){
        t[v][type]++;
        return;
    }
    int tm = (l + r) / 2;
    if(pos <= tm)
        update(v + v, l, tm, pos, type);
    else
        update(v + v + 1, tm + 1, r, pos, type);
    t[v][type] = t[v + v][type] + t[v + v + 1][type];
}

int get(int v, int l, int r, int x, int y, int type){
    if(x > r or l > y)
        return 0;
    if(x <= l and r <= y)
        return t[v][type];
    int tm = (l + r) / 2;
    return get(v + v, l, tm, x, y, type) + get(v + v + 1, tm + 1, r, x, y, type);
}

int ask(int l, int r){
    if(ans[r] != -1)
        return ans[r] + get(1, 1, n, 1, r, 1);
    cout << "? " << l << " " << r << endl;
    int s;
    cin >> s;
    s -= get(1, 1, n, 1, r, 1);
    ans[r] = s;
    return s + get(1, 1, n, 1, r, 1);
}

int main(){
    cin >> n >> q;
    for(int i = 1; i <= n; i++){
        ans[i] = -1;
    }
    for(int _ = 1; _ <= q; _++){
        cin >> k;
        int l = 1, r = n, ans = -1;
        while(l <= r){
            int mid = (l + r) / 2;
            int cur = ask(1, mid);
            cur = mid - cur;
            if(cur >= k){
                r = mid - 1;
                ans = mid;
            }
            else if(cur < k){
                l = mid + 1;
            }
        }
        cout << "! " << ans << endl;
        update(1, 1, n, ans, 1);
    }
}
