N = int(eval(input()))

k = len(bin(N))-3

print((2**k))
N = int(eval(input()))

l = len(bin(N))-3

print((2**l))
N = int(eval(input()))
k = len(bin(N)) - 3
print((2**k))

N = int(eval(input()))
l = len(bin(N)) - 3
print((2**l))

-k = len(bin(N)) - 3 -print((2**k)) +l = len(bin(N)) - 3 +print((2**l))