n = int(eval(input()))



mx = [0, 0]

for i in range(1, n+1):

    j = i

    cnt = 0

    while j % 2 == 0:

        cnt += 1

        j = j // 2

    if mx[0] < cnt:

        mx[0] = cnt

        mx[1] = i



print((mx[1] if mx[0] != 0 else 1))
N = int(eval(input()))



L = [0] * 101

for i in range(1, 101):

    cnt = 0

    tmp = i

    while tmp % 2 == 0:

        cnt += 1

        tmp //= 2

    L[i] = cnt



print((L.index(max(L[1:N+1])) if N !=1 else 1))
n = int(eval(input()))
mx = [0, 0]
for i in range(1, n + 1):
    j = i
    cnt = 0
    while j % 2 == 0:
        cnt += 1
        j = j // 2
    if mx[0] < cnt:
        mx[0] = cnt
        mx[1] = i
print((mx[1] if mx[0] != 0 else 1))

N = int(eval(input()))
L = [0] * 101
for i in range(1, 101):
    cnt = 0
    tmp = i
    while tmp % 2 == 0:
        cnt += 1
        tmp //= 2
    L[i] = cnt
print((L.index(max(L[1 : N + 1])) if N != 1 else 1))

-n = int(eval(input())) -mx = [0, 0] -for i in range(1, n + 1): -    j = i +N = int(eval(input())) +L = [0] * 101 +for i in range(1, 101): -    while j % 2 == 0: +    tmp = i +    while tmp % 2 == 0: -        j = j // 2 -    if mx[0] < cnt: -        mx[0] = cnt -        mx[1] = i -print((mx[1] if mx[0] != 0 else 1)) +        tmp //= 2 +    L[i] = cnt +print((L.index(max(L[1 : N + 1])) if N != 1 else 1))