x,y,z = map(int,(input().split()))
a=z
for b in range(10):
    a = x*a-y
    print(a) x,y,z = map(int,(input().split())) x map(int,(input().split())) map int input().split() ().split () input split y z a=z a z for b in range(10):
    a = x*a-y
    print(a) b range(10) range 10 a = x*a-y a x*a-y x*a x a y print(a) print a z = map(int,(input().split())) map(int,(input().split())) z x,y,z = map(int,(input().split())) map(int,(input().split())) x y,z = map(int,(input().split())) map(int,(input().split())) y a=z z a a = x*a-y x*a-y a
x,y,z = map(int,(input().split()))
a=z
for b in range(10):
    a = x*a-y
    print(a)
