import sys input = sys.stdin.readline T=int(input()) for tests in range(T): N=int(input()) x=N.bit_count() for i in range(60): y=(1<