#37088: python 紀錄


BensonDC (python戰士)


T=int(input())
for i in range(1,T+1):
    Ans=1
    for j in input():
        Ans*=int(j)
    print(Ans)