R,D,X = map(int,input().split())
a = X

for n in range(10):
  a = R*a-D
  print(a) R,D,X = map(int,input().split()) R map(int,input().split()) map int input().split() ().split () input split D X a = X a X for n in range(10):
  a = R*a-D
  print(a) n range(10) range 10 a = R*a-D a R*a-D R*a R a D print(a) print a a = R*a-D R*a-D a a = X X a R,D,X = map(int,input().split()) map(int,input().split()) R D,X = map(int,input().split()) map(int,input().split()) D X = map(int,input().split()) map(int,input().split()) X
R,D,X = map(int,input().split())
a = X

for n in range(10):
  a = R*a-D
  print(a)