At last, we have successfully neutralized all the cyber weapons of mass destruction, saved our university along the way and lay to waste another evil scheme in the process. All that separates that hacker from us now is his last lair of security, his ultimate firewall. It is imperative for us to break through this last line of defense and punish the one responsible for all this loss. Breaking this firewall shall be no easy task, but we aren't letting go either. Shift your gears in reverse and get cracking.


Input:

TThe first line will consist of the total number of test cases T. 
The next T lines will consist of number N on each line where 1 ≤ N ≤ 100.



Output:
For each test case, output is a number.



Example:
Input:

3
2
12
44



Output:

8
96
11264
from math import *

t=int(raw_input())

for x in range(0,t):
    
    n=int(raw_input())
    
    sum=0
    
    foo=n
    
    while(foo>0):
        
        sum=sum+ (foo%10)
        
        foo=foo//10
        
    foobar=int(pow(2,sum))
    
    ans=foobar*n
    
    print(ans)