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

for n 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 n in range(10):
  X = R*X-D
  print(X) n range(10) range 10 X = R*X-D X R*X-D R*X R X D print(X) print X 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 X = R*X-D R*X-D X
R,D,X = map(int,input().split())

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