n=int(input())
a1=input().split()
a=[]
for i in range(n):
    a.append(int(a1[i]))
pref=[1]
for i in range(n):
    pref.append(pref[i]*a[i])
sufix=[]
for i in range(n+1):
    sufix.append(3)
sufix[n]=1
for i in range(n):
    sufix[n-i-1]=sufix[n-i]*a[n-i-1]
for i in range(n):
    print(pref[i]*sufix[i+1],end=" ")
print()
