r, D, x = map(int, input().split())
def f(r, D, x):
  return r * x - D

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

for i in range(10):
  x = f(r, D, x)
  print(x)