T = int(input()) for _ in range(T): N = int(input()) ans = 0 cnt = N.bit_count() for i in reversed(range(60)): if 1<