def reform(): i = -1 while pirepo[i] >= 10: q = pirepo[i] // 10 pirepo[i] %= 10 i -= 1 pirepo[i] += q digits = 1000 bucketsize = 10 * digits // 3 + 1 bucket = [2 for i in range(bucketsize)] pirepo = [] for i in range(digits): bucket = [bucket[j] * 10 for j in range(bucketsize)] quotient = 0 for j in range(bucketsize): index = bucketsize - j - 1 bucket[index] += quotient * (index + 1) quotient = bucket[index] // (2 * index + 1) bucket[index] %= (2 * index + 1) bucket[0] = quotient % 10 output = quotient // 10 pirepo.append(output) reform() for i in range(0,1000,25): print(''.join(str(v) for v in pirepo[i:i+25])) if i > 0 and i % 150 == 0: input()