r,D,x=map(int,input().split())

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

for i in range(10):
    x*=r
    x-=D
    print(x)