r,d,X=map(int,input().split())
x=[X]
for i in range(10):
    x.append(r*x[i]-d)
del x[0]
#print(x)
for i in range(len(x)):
    print(x[i]) r,d,X=map(int,input().split()) r map(int,input().split()) map int input().split() ().split () input split d X x=[X] x [X] X for i in range(10):
    x.append(r*x[i]-d) i range(10) range 10 x.append(r*x[i]-d) x.append x append r*x[i]-d r*x[i] r x[i] x i d del x[0] x[0] x 0 for i in range(len(x)):
    print(x[i]) i range(len(x)) range len(x) len x print(x[i]) print x[i] x i r,d,X=map(int,input().split()) map(int,input().split()) r x=[X] [X] x 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())
x=[X]
for i in range(10):
    x.append(r*x[i]-d)
del x[0]
#print(x)
for i in range(len(x)):
    print(x[i])