N = int(eval(input()))



a = 1



while a*2<=N:

  a *= 2

print(a)
N = int(eval(input()))

ans = 1

while ans*2 <= N:

  ans *= 2

print(ans)
N = int(eval(input()))
a = 1
while a * 2 <= N:
    a *= 2
print(a)

N = int(eval(input()))
ans = 1
while ans * 2 <= N:
    ans *= 2
print(ans)

-a = 1 -while a * 2 <= N: -    a *= 2 -print(a) +ans = 1 +while ans * 2 <= N: +    ans *= 2 +print(ans)