#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll gas;
ll get_and(ll i, ll j) {
  gas--;
  assert(gas >= 0);
  cout << "and " << i + 1 << " " << j + 1 << "\n";
  cout.flush();
  ll x;
  cin >> x;
  if (x == -1) exit(0);
  return x;
}
ll get_or(ll i, ll j) {
  gas--;
  assert(gas >= 0);
  cout << "or " << i + 1 << " " << j + 1 << "\n";
  cout.flush();
  ll x;
  cin >> x;
  if (x == -1) exit(0);
  return x;
}
int main() {
  ios::sync_with_stdio(false);
  ll n, k;
  cin >> n >> k;
  gas = 2 * n;
  vector<ll> A(n), B(n);
  for (ll i = 1; i < n; i++) {
    A[i] = get_and(0, i);
  }
  for (ll i = 1; i < n; i++) {
    B[i] = get_or(0, i);
  }
  vector<ll> C(n);
  for (ll i = 1; i < n; i++) {
    C[i] = B[i] - A[i];
  }
  ll X = B[1] | B[2];
  ll Y = get_and(1, 2);
  ll W = get_or(1, 2);
  X -= W;
  X += A[1];
  X += A[2];
  X -= (A[1] & A[2] & Y);
  ;
  ll a = X;
  vector<ll> v;
  v.push_back(a);
  for (ll i = 1; i < n; i++) {
    v.push_back(a ^ C[i]);
  }
  sort(v.begin(), v.end());
  cout << "finish " << v[k - 1] << "\n";
  cout.flush();
  return 0;
}

### Prompt

Please formulate a Cpp solution to the following problem:

<image>

This is an interactive task

William has a certain sequence of integers a_1, a_2, ..., a_n in his mind, but due to security concerns, he does not want to reveal it to you completely. William is ready to respond to no more than 2 ⋅ n of the following questions:

  * What is the result of a [bitwise AND](https://en.wikipedia.org/wiki/Bitwise_operation#AND) of two items with indices i and j (i ≠ j) 
  * What is the result of a [bitwise OR](https://en.wikipedia.org/wiki/Bitwise_operation#OR) of two items with indices i and j (i ≠ j) 



You can ask William these questions and you need to find the k-th smallest number of the sequence.

Formally the k-th smallest number is equal to the number at the k-th place in a 1-indexed array sorted in non-decreasing order. For example in array [5, 3, 3, 10, 1] 4th smallest number is equal to 5, and 2nd and 3rd are 3.

Input

It is guaranteed that for each element in a sequence the condition 0 ≤ a_i ≤ 10^9 is satisfied.

Interaction

In the first line you will be given two integers n and k (3 ≤ n ≤ 10^4, 1 ≤ k ≤ n), which are the number of items in the sequence a and the number k.

After that, you can ask no more than 2 ⋅ n questions (not including the "finish" operation).

Each line of your output may be of one of the following types: 

  * "or i j" (1 ≤ i, j ≤ n, i ≠ j), where i and j are indices of items for which you want to calculate the bitwise OR. 
  * "and i j" (1 ≤ i, j ≤ n, i ≠ j), where i and j are indices of items for which you want to calculate the bitwise AND. 
  * "finish res", where res is the kth smallest number in the sequence. After outputting this line the program execution must conclude. 



In response to the first two types of queries, you will get an integer x, the result of the operation for the numbers you have selected.

After outputting a line do not forget to output a new line character and flush the output buffer. Otherwise you will get the "Idleness limit exceeded". To flush the buffer use:

  * fflush(stdout) in C++ 
  * System.out.flush() in Java 
  * stdout.flush() in Python 
  * flush(output) in Pascal 
  * for other languages refer to documentation 



If you perform an incorrect query the response will be -1. After receiving response -1 you must immediately halt your program in order to receive an "Incorrect answer" verdict.

Hacking

To perform a hack you will need to use the following format:

The first line must contain two integers n and k (3 ≤ n ≤ 10^4, 1 ≤ k ≤ n), which are the number of items in the sequence a and the number k.

The second line must contain n integers a_1, a_2, ..., a_n (0 ≤ a_i ≤ 10^9), the sequence a.

Example

Input


7 6

2

7

Output


and 2 5

or 5 6

finish 5

Note

In the example, the hidden sequence is [1, 6, 4, 2, 3, 5, 4].

Below is the interaction in the example.

Query (contestant's program)| Response (interactor)| Notes  
---|---|---  
and 2 5| 2| a_2=6, a_5=3. Interactor returns bitwise AND of the given numbers.  
or 5 6| 7| a_5=3, a_6=5. Interactor returns bitwise OR of the given numbers.  
finish 5| | 5 is the correct answer. Note that you must find the value and not the index of the kth smallest number.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll gas;
ll get_and(ll i, ll j) {
  gas--;
  assert(gas >= 0);
  cout << "and " << i + 1 << " " << j + 1 << "\n";
  cout.flush();
  ll x;
  cin >> x;
  if (x == -1) exit(0);
  return x;
}
ll get_or(ll i, ll j) {
  gas--;
  assert(gas >= 0);
  cout << "or " << i + 1 << " " << j + 1 << "\n";
  cout.flush();
  ll x;
  cin >> x;
  if (x == -1) exit(0);
  return x;
}
int main() {
  ios::sync_with_stdio(false);
  ll n, k;
  cin >> n >> k;
  gas = 2 * n;
  vector<ll> A(n), B(n);
  for (ll i = 1; i < n; i++) {
    A[i] = get_and(0, i);
  }
  for (ll i = 1; i < n; i++) {
    B[i] = get_or(0, i);
  }
  vector<ll> C(n);
  for (ll i = 1; i < n; i++) {
    C[i] = B[i] - A[i];
  }
  ll X = B[1] | B[2];
  ll Y = get_and(1, 2);
  ll W = get_or(1, 2);
  X -= W;
  X += A[1];
  X += A[2];
  X -= (A[1] & A[2] & Y);
  ;
  ll a = X;
  vector<ll> v;
  v.push_back(a);
  for (ll i = 1; i < n; i++) {
    v.push_back(a ^ C[i]);
  }
  sort(v.begin(), v.end());
  cout << "finish " << v[k - 1] << "\n";
  cout.flush();
  return 0;
}

```