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 <iostream>
#include <cmath>
#include <iomanip>
#include <vector>
#include <stack>
#include <queue>
#include <list>
#include <map>
#include <set>
#include <bitset>
#include <string>
#include <algorithm>
#include <iterator>
#include <unordered_map>
#include <unordered_set>
#include <sstream>
#include <fstream>
#include <numeric>
#include <tuple>
#include <ctime>
#include <random>
#include <array>
#include <cassert>

using namespace std;

#define fori(t) for(int i = 0; i < t; ++i)
#define forj(n) for(int j = 0; j < n; ++j)
#define fork(n) for(int k = 0; k < n; ++k)
#define forai(a) for(auto& i : a)
#define foraj(a) for(auto& j : a)
#define forak(a) for(auto& k : a)
#define forp(s, n, d) for(int p = s; p < n; p += d)
#define fast ios_base::sync_with_stdio(0); cin.tie(0);
#define pb(a) push_back(a);
#define pob(a) pop_back(a);
#define sorti(a) sort((a).begin(), (a).end());
#define sortm(a, n) sort(a, a + n);
#define reversi(a) reverse((a).begin(), (a).end());
#define all(a) (a).begin(), (a).end()
#define fi first
#define se second
#define yes cout << "YES\n";
#define no cout << "NO\n";
#define ans(a) cout << a << '\n';
#define endl '\n'
#define res(a, n) (a).resize(n);
#define read(a, n) (a).resize(n); fori(n) cin >> a[i];
#define print(a) for (auto hart : a) cout << hart << ' ';
#define clear(a) (a).clear();
//#define int long long
//#define double long double

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> ii;
typedef pair<long long, long long> llll;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector<pair<int, int>> vii;
typedef vector<pair<int, pair<int, int>>> viii;
typedef pair<int, pair<int, int>> iii;
typedef vector<pair<long long, long long>> vllll;
typedef vector<vector<int>> vvi;
typedef vector<vector<ll>> vvll;
typedef vector<bool> vb;
typedef pair<char, char> cc;
typedef pair<pair<char, char>, char> ccc;
typedef vector<char> vc;
typedef pair<int, char> ic;
typedef pair<ii, char> iic;
typedef vector<bool> vb;
typedef set<int> si;
typedef vector<vector<ii>> vvii;
typedef vector<vector<iii>> vviii;
typedef vector<vector<llll>> vvllll;

const int INF = 2147483647;
const ll LONGINF = 9223372036854775807;
const ll MOD = 998244353;

class SegmentTree
{
private:
    
    int amount;
    vector<ll> tree;
    vector<ll> mod;
    
    void push(int l, int r, int v)
    {
        if (mod[v] != 0)
        {
            mod[v << 1] += mod[v];
            mod[(v << 1) + 1] += mod[v];
            int m = (l + r) >> 1;
            tree[(v << 1)] += (m - l + 1ll) * mod[v];
            tree[(v << 1) + 1] += (r - m + 0ll) * mod[v];
            mod[v] = 0;
        }
    }
    
    void buildTree(int l, int r, int v, vector<ll>& a)
    {
        if (l > r) return;
        if (l == r)
        {
            tree[v] = a[l];
            return;
        }
        int m = (l + r) >> 1;
        buildTree(l, m, v << 1, a);
        buildTree(m + 1, r, (v << 1) + 1, a);
        tree[v] = tree[v << 1] + tree[(v << 1) + 1];
    }
    
    ll get(int a, int b, int l, int r, int v)
    {
        if (a > r || b < l) return 0ll;
        if (a == l && b == r) return tree[v];
        push(l, r, v);
        int m = (l + r) >> 1;
        return get(a, min(b, m), l, m, v << 1) + get(max(a, m + 1), b, m + 1, r, (v << 1) + 1);
    }
    
    void update(int a, int b, int l, int r, int v, ll value)
    {
        if (a > r || b < l) return;
        if (a == l && b == r)
        {
            mod[v] += value;
            tree[v] += (r - l + 1ll) * value;
            return;
        }
        push(l, r, v);
        int m = (l + r) >> 1;
        update(a, min(b, m), l, m, v << 1, value);
        update(max(a, m + 1), b, m + 1, r, (v << 1) + 1, value);
        tree[v] = tree[v << 1] + tree[(v << 1) + 1];
    }
    
public:
    
    SegmentTree() {}
    
    SegmentTree(int n, vector<ll>& a) : amount(n)
    {
        tree.resize(4 * n + 5);
        mod.resize(4 * n + 5);
        buildTree(0, n - 1, 1, a);
    }
    
    ll get(int a, int b)
    {
        return get(a, b, 0, amount - 1, 1);
    }
    
    void update(int a, int b, ll value)
    {
        update(a, b, 0, amount - 1, 1, value);
    }
};

void solve()
{
    int n, t;
    cin >> n >> t;
    vector<ll> prefs(((n + 9) / 10) * 10 + 1, 0);
    SegmentTree st;
    for (int flf = 0; flf < t; ++flf)
    {
        int k;
        cin >> k;
        if (flf == 0)
        {
            for (int i = 0; i <= ((n + 9) / 10) * 10; ++i)
            {
                if (i % 10 != 0)
                {
                    prefs[i] = -INF;
                    continue;
                }
                if (i >= n)
                {
                    prefs[i] = prefs[i - 10];
                    continue;
                }
                cout << "? 1 " << i + 1 << '\n';
                cout.flush();
                cin >> prefs[i];
            }
            //st = SegmentTree((int)prefs.size(), prefs);
        }
        int l = 0, r = ((int)prefs.size() - 1) / 10;
        while (l < r)
        {
            int m = (l + r) >> 1;
            int c = (int)prefs[m * 10];//(int)st.get(m * 10, m * 10);
            if (m * 10 + 1 - c <= k - 1) l = m + 1;
            else r = m;
        }
        if (l == 0)
        {
            cout << "! 1\n";
            cout.flush();
            for (int d = 0; d < prefs.size(); ++d) ++prefs[d];
            //st.update(0, (int)prefs.size() - 1, 1);
            continue;
        }
        r = min(l * 10, n - 1);
        l = l * 10 - 10;
        while (l < r)
        {
            int m = (l + r) >> 1;
            if (prefs[m] < 0)
            {
                cout << "? 1 " << m + 1 << '\n';
                cout.flush();
                cin >> prefs[m];
            }
            int c = (int)prefs[m];
            if (m + 1 - c <= k - 1) l = m + 1;
            else r = m;
        }
        cout << "! " << l + 1 << '\n';
        cout.flush();
        for (int d = l; d < prefs.size(); ++d) ++prefs[d];
        //st.update(l, (int)prefs.size() - 1, 1);
    }
}

signed main()
{
    fast
    bool mult = false;
    if (mult)
    {
        int t;
        cin >> t;
        while (t--) solve();
    }
    else solve();
    return 0;
}