from math import prod longNum = "".join([str(i) for i in range(1000000)]) print (prod([int(longNum[10**i]) for i in range(7)]))