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