<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.
## IO starts (Thanks pajenegod)

from sys import stdout
import os

ii = 0
_inp = b""

def getchar():
    global ii,_inp
    if ii >= len(_inp):
        _inp = os.read(0,4096)
        ii = 0
    if not _inp:
        return b" "[0]
    ii += 1
    return _inp[ii-1]

def input():
    c = getchar()
    if c == b"-"[0]:
        x = 0
        sign = 1
    else:
        x = c-b"0"[0]
        sign = 0
    c = getchar()
    while c >= b"0"[0]:
        x = 10*x+c-b"0"[0]
        c = getchar()
    if c == b"\r"[0]:
        getchar()
    return -x if sign else x

## IO ends
# reference https://codeforces.com/contest/1543/submission/121781191

def main():
    n,k = int(input()),int(input())
    _sum = []
    for i in range(2,n+1):
        stdout.write(f"or {1} {i}\n")
        stdout.flush()
        _or = int(input())
        if _or == -1:
            exit()
        stdout.write(f"and {1} {i}\n")
        stdout.flush()
        _and = int(input())
        if _and == -1:
            exit()
        _sum.append((_or&((1<<_or.bit_length())-1-_and))+2*_and)
    stdout.write(f"or {2} {3}\n")
    stdout.flush()
    _or = int(input())
    if _or == -1:
        exit()
    stdout.write(f"and {2} {3}\n")
    stdout.flush()
    _and = int(input())
    if _and == -1:
        exit()
    val = [(_sum[0]+_sum[1]-((_or&((1<<_or.bit_length())-1-_and))+2*_and))//2]
    for i in range(n-1):
        val.append(_sum[i]-val[0])
    rr = sorted(range(n),key=lambda xx:val[xx])
    stdout.write(f"finish {val[rr[k-1]]}\n")
    stdout.flush()

if __name__ == "__main__":
    main()
Below is a problem description that describes the problem. Write code in Python that appropriately solves the problem.

### Description:
<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.

### Input:
7 6

2

7
### Output:
and 1 2
or 1 2
and 1 3
or 1 3
and 2 3
or 2 3
and 1 4
or 1 4
and 1 5
or 1 5
and 1 6
or 1 6
and 1 7
or 1 7
finish 7


### Input:
50 43
868459110 111980246 912464887 345564083 50698562 567895482 523308042 361618581 255638441 472446260 708745255 175715709 646865671 350601298 258860025 492164452 321079037 859323542 159865077 128563959 259209508 781885841 392147760 735212901 5819700 508394386 837384236 975501975 252880628 76008256 518048654 928076746 708895701 696956585 509733404 476971122 473242568 252218318 617051114 616442320 89971511 743044445 663559926 282608951 199811758 227570740 788374503 613758748 395622287 17755542

### Output:
and 1 2
or 1 2
and 2 3
or 2 3
and 3 1
or 3 1
and 1 4
or 1 4
and 1 5
or 1 5
and 1 6
or 1 6
and 1 7
or 1 7
and 1 8
or 1 8
and 1 9
or 1 9
and 1 10
or 1 10
and 1 11
or 1 11
and 1 12
or 1 12
and 1 13
or 1 13
and 1 14
or 1 14
and 1 15
or 1 15
and 1 16
or 1 16
and 1 17
or 1 17
and 1 18
or 1 18
and 1 19
or 1 19
and 1 20
or 1 20
and 1 21
or 1 21
and 1 22
or 1 22
and 1 23
or 1 23
and 1 24
or 1 24
and 1 25
or 1 25
and 1 26
or 1 26
and 1 27
or 1 27
and 1 28
or 1 28
and 1 29
or 1 29
and 1 30
or 1 30
and 1 31
or 1 31
and 1 32
or 1 32
and 1 33
or 1 33
and 1 34
or 1 34
and 1 35
or 1 35
and 1 36
or 1 36
and 1 37
or 1 37
and 1 38
or 1 38
and 1 39
or 1 39
and 1 40
or 1 40
and 1 41
or 1 41
and 1 42
or 1 42
and 1 43
or 1 43
and 1 44
or 1 44
and 1 45
or 1 45
and 1 46
or 1 46
and 1 47
or 1 47
and 1 48
or 1 48
and 1 49
or 1 49
and 1 50
or 1 50
finish 870593134


### Code:
## IO starts (Thanks pajenegod)

from sys import stdout
import os

ii = 0
_inp = b""

def getchar():
    global ii,_inp
    if ii >= len(_inp):
        _inp = os.read(0,4096)
        ii = 0
    if not _inp:
        return b" "[0]
    ii += 1
    return _inp[ii-1]

def input():
    c = getchar()
    if c == b"-"[0]:
        x = 0
        sign = 1
    else:
        x = c-b"0"[0]
        sign = 0
    c = getchar()
    while c >= b"0"[0]:
        x = 10*x+c-b"0"[0]
        c = getchar()
    if c == b"\r"[0]:
        getchar()
    return -x if sign else x

## IO ends
# reference https://codeforces.com/contest/1543/submission/121781191

def main():
    n,k = int(input()),int(input())
    _sum = []
    for i in range(2,n+1):
        stdout.write(f"or {1} {i}\n")
        stdout.flush()
        _or = int(input())
        if _or == -1:
            exit()
        stdout.write(f"and {1} {i}\n")
        stdout.flush()
        _and = int(input())
        if _and == -1:
            exit()
        _sum.append((_or&((1<<_or.bit_length())-1-_and))+2*_and)
    stdout.write(f"or {2} {3}\n")
    stdout.flush()
    _or = int(input())
    if _or == -1:
        exit()
    stdout.write(f"and {2} {3}\n")
    stdout.flush()
    _and = int(input())
    if _and == -1:
        exit()
    val = [(_sum[0]+_sum[1]-((_or&((1<<_or.bit_length())-1-_and))+2*_and))//2]
    for i in range(n-1):
        val.append(_sum[i]-val[0])
    rr = sorted(range(n),key=lambda xx:val[xx])
    stdout.write(f"finish {val[rr[k-1]]}\n")
    stdout.flush()

if __name__ == "__main__":
    main()