N = int(input())
l = list(range(1, 2 * N + 2))
while l:
    print(l.pop(0))
    inp = int(input())
    if inp == 0:
        exit()
    else:
        l.pop(l.index(inp))

9e26f40cb0dde6a5f8dd52dc162c16a53567eeee
<mask token>

<mask token>
while l:
    print(l.pop(0))
    inp = int(input())
    if inp == 0:
        exit()
    else:
        l.pop(l.index(inp))

N = int(input())
l = list(range(1, 2 * N + 2))
while l:
    print(l.pop(0))
    inp = int(input())
    if inp == 0:
        exit()
    else:
        l.pop(l.index(inp))
