for _ in range(int(input())):
answer = 1
for i in input():
# answer = answer * int(i)
answer *= int(i)
print(answer)