def pseudorandom(a, b, m, r):
    while True:
        r = (a*r+b)%m
        yield r

rold = int(input("Seed the generator: "))
generator = pseudorandom(32310901, 1729, 2**24, rold)

for i in range (100):
    print(next(generator))
