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