Recently Vova found $n$ candy wrappers. He remembers that he bought $x$ candies during the first day, $2x$ candies during the second day, $4x$ candies during the third day, $\dots$, $2^{k-1} x$ candies during the $k$-th day. But there is an issue: Vova remembers neither $x$ nor $k$ but he is sure that $x$ and $k$ are positive integers and $k > 1$.

Vova will be satisfied if you tell him any positive integer $x$ so there is an integer $k>1$ that $x + 2x + 4x + \dots + 2^{k-1} x = n$. It is guaranteed that at least one solution exists. Note that $k > 1$.

You have to answer $t$ independent test cases.


-----Input-----

The first line of the input contains one integer $t$ ($1 \le t \le 10^4$) — the number of test cases. Then $t$ test cases follow.

The only line of the test case contains one integer $n$ ($3 \le n \le 10^9$) — the number of candy wrappers Vova found. It is guaranteed that there is some positive integer $x$ and integer $k>1$ that $x + 2x + 4x + \dots + 2^{k-1} x = n$.


-----Output-----

Print one integer — any positive integer value of $x$ so there is an integer $k>1$ that $x + 2x + 4x + \dots + 2^{k-1} x = n$.


-----Example-----
Input
7
3
6
7
21
28
999999999
999999984

Output
1
2
1
7
4
333333333
333333328



-----Note-----

In the first test case of the example, one of the possible answers is $x=1, k=2$. Then $1 \cdot 1 + 2 \cdot 1$ equals $n=3$.

In the second test case of the example, one of the possible answers is $x=2, k=2$. Then $1 \cdot 2 + 2 \cdot 2$ equals $n=6$.

In the third test case of the example, one of the possible answers is $x=1, k=3$. Then $1 \cdot 1 + 2 \cdot 1 + 4 \cdot 1$ equals $n=7$.

In the fourth test case of the example, one of the possible answers is $x=7, k=2$. Then $1 \cdot 7 + 2 \cdot 7$ equals $n=21$.

In the fifth test case of the example, one of the possible answers is $x=4, k=3$. Then $1 \cdot 4 + 2 \cdot 4 + 4 \cdot 4$ equals $n=28$.

Difficulty: introductory

Starter code:

Solutions:
from math import *
test = int(input())
for test_case in range(test):
	n = int(input())
	ct = 3
	p = 2
	while(1):
		if(n%ct == 0):
			print(n//ct)
			break
		p *= 2
		ct += p

t = int(input())
for i in range(t):
    n = int(input())
    st2 = 4
    while n % (st2 - 1) != 0:
        st2 *= 2
    print(n // (st2 - 1))

for i in range(int(input())):
	n=int(input())
	tmp=3
	while(True):
		if(n%tmp==0):
			print(int(n/tmp))
			break
		else:
			tmp=tmp*2+1

tab = [1,3]
for i in range(100):
	xx = tab[-1]
	tab.append(xx + 2**(i+2))

t = int(input())
for rew in range(t):
	n = int(input())
	wyn = -1
	for j in tab:
		if n%j == 0 and j > 1:
			wyn = n//j
			break
	print(wyn)

t = int(input())
for _ in range(t):
    n = int(input())
    for k in range(2, 31):
        if n % (2**k - 1) == 0:
            print(n // (2 ** k - 1))
            break

# a = list(map(int,input().split()))
# n,m = map(int,input().split())



t = int(input())
for _ in range(t):
    n = int(input())
    k = 4
    while n % (k - 1) != 0:
        k *= 2
    print(n // (k-1))


t=int(input())
for i in range(t):
    n=int(input())
    d=2
    while True:
        if n%(2**d-1)==0:print(n//(2**d-1));break
        d+=1

t=int(input())
while t:
    n=int(input())
    temp=1
    for i in range(1,50):
        temp+=2**i
        if(n%temp==0):
            print(n//temp)
            break
    t-=1    

t = int(input())
for i in range(t):
    n = int(input())
    k = 4
    while n % (k - 1) != 0:
        k *= 2
    print(n//(k-1))


#JMD
#Nagendra Jha-4096

 
import sys
import math

#import fractions
#import numpy
 
###File Operations###
fileoperation=0
if(fileoperation):
    orig_stdout = sys.stdout
    orig_stdin = sys.stdin
    inputfile = open('W:/Competitive Programming/input.txt', 'r')
    outputfile = open('W:/Competitive Programming/output.txt', 'w')
    sys.stdin = inputfile
    sys.stdout = outputfile

###Defines...###
mod=1000000007
 
###FUF's...###
def nospace(l):
    ans=''.join(str(i) for i in l)
    return ans
 
 
 
##### Main ####
t=int(input())
for tt in range(t):
    n=int(input())
    k=2
    while(k<80):
        v=pow(2,k)-1
        if(n%v==0):
            print(n//v)
            break;
        k+=1
    #n,k,s= map(int, sys.stdin.readline().split(' '))
    #a=list(map(int,sys.stdin.readline().split(' ')))
    
    
#####File Operations#####
if(fileoperation):
    sys.stdout = orig_stdout
    sys.stdin = orig_stdin
    inputfile.close()
    outputfile.close()

t = int(input())
for i in range(t):
    n = int(input())
    k = 4
    while n % (k - 1) != 0:
        k *= 2
    print(n // (k - 1))


        
        
def __starting_point():
    n = int(input())
    
    for i in range(n):
        n = int(input())
        k = 4
        while True:
            if n%(k-1) == 0:
                print(n//(k-1))
                break
            else:
                k *= 2
__starting_point()

for _ in range(1, int(input()) + 1):
	n = int(input())
	for i in range(2, 36):
		if( n % (2**i - 1) == 0):
			print(n//(2**i - 1))
			break

from sys import stdin
from collections import deque
mod = 10**9 + 7
import sys
import random
# sys.setrecursionlimit(10**6)
from queue import PriorityQueue
# def rl():
#     return [int(w) for w in stdin.readline().split()]
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt,factorial,gcd,log2,inf,ceil
# map(int,input().split())
# # l = list(map(int,input().split()))
# from itertools import permutations
import heapq
# input = lambda: sys.stdin.readline().rstrip()
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
from itertools import permutations
from math import factorial as f

# def ncr(x, y):
#     return f(x) // (f(y) * f(x - y))
def ncr(n, r, p):
    num = den = 1
    for i in range(r):
        num = (num * (n - i)) % p
        den = (den * (i + 1)) % p
    return (num * pow(den,
                      p - 2, p)) % p

t = int(input())

for _ in range(t):

    n = int(input())
    ans = -1
    for i in range(2,100):
        if n%(2**i - 1) == 0:
            ans = (n//(2**i - 1))
            break

    print(ans)







def solve():
    n = int(input())
    t = 2
    while True:
        k = 2**t - 1
        if n % k == 0:
            return n // k
        t += 1

#----
t = int(input())
for case in range(t):
    print(solve())
        



t=int(input())
for i in range(t):
    n=int(input())
    k=2
    while True:
        if n%(2**k-1)==0:
            print(n//(2**k-1))
            break
        k=k+1

import sys
import math

def ii():
    return sys.stdin.readline().strip()

def idata():
    return [int(x) for x in ii().split()]

def bfs(graph1, root1):
    visited1 = set()
    queue1 = [[root1, 0]]
    visited1.add(root1)
    qw, ver = 0, 1
    while queue1:
        vertex1 = queue1[0]
        queue1 = queue1[1:]
        for neig1 in graph1[vertex1[0]]:
            if neig1 not in visited1:
                visited1.add(neig1)
                queue1 += [[neig1, vertex1[1] + 1]]
                if qw < vertex1[1] + 1:
                    ver, qw = neig1, vertex1[1] + 1
    return ver, qw

def dfs(graph, ver):
    used_v = set()
    depth = [0] * (len(graph) + 1)
    level = [ver]
    num_of_level = 0
    while level:
        new_level = []
        for v in level:
            depth[v] = num_of_level
            used_v.add(v)
            for v1 in graph[v]:
                if v1 not in used_v:
                    new_level += [v1]
        level = new_level
        num_of_level += 1
    return depth

def binary_search(array, x):
    left, right = -1, len(array)
    while left + 1 != right:
        middle = (left + right) // 2
        if array[middle] >= x:
            right = middle
        elif array[middle] < x:
            left = middle
    return right

def c_mod(n1, k1, mod1):
    num = den = 1
    for i in range(n1 - k1):
        num = (num * (n1 - i)) % mod1
        den = (den * (i + 1)) % mod1
    return (num * pow(den, mod1 - 2, mod1)) % mod1

def c(n1, k1):
    num = den = 1
    for i in range(n1 - k1):
        num = num * (n1 - i)
        den = den * (i + 1)
    return num // den

def v_sistemu(x, k):
    x = int(x)
    z = ''
    while x:
        z += str(x % k)
        x //= k
    return z[::-1]

def iz_sistemi(x, k):
    x = str(x)[::-1]
    ans = 0
    for i in range(len(x)):
        ans += int(x[i]) * pow(k, i)
    return ans

def solve_of_problem():
    n = int(ii())
    ans = 2
    for i in range(n):
        ans *= 2
        if n % (ans - 1) == 0:
            print(n // (ans - 1))
            return
    return

for ______ in range(int(ii())):
    solve_of_problem()