for _ in range(int(input())): N = int(input()) L, R = 0, 0 flag = False for i in reversed(range(60)): if 1<