T = int(input()) for i in range(T): N = int(input()) C = -1 D = -1 for j in range(31): if(N & (1<