a = ['a1','a2','a3',]
b = ['b1',]
c = ['c1','c2',]
d = ['d1','d2','d3','d4',]
total = []
for i in range(0, len(a)):
for j in range(0, len(b)):
for k in range(0, len(c)):
for l in range(0, len(d)):
total.append(a[i]+b[j]+c[k]+d[l])
print(total)
print(len(total))