r, D, x_2000 = map(int, input().split())
x = x_2000
for _ in range(10):
    print(r * x - D)
    x = r * x - D r, D, x_2000 = map(int, input().split()) r map(int, input().split()) map int input().split() ().split () input split D x_2000 x = x_2000 x x_2000 for _ in range(10):
    print(r * x - D)
    x = r * x - D _ range(10) range 10 print(r * x - D) print r * x - D r * x r x D x = r * x - D x r * x - D r * x r x D r, D, x_2000 = map(int, input().split()) map(int, input().split()) r x = r * x - D r * x - D x x_2000 = map(int, input().split()) map(int, input().split()) x_2000 x = x_2000 x_2000 x D, x_2000 = map(int, input().split()) map(int, input().split()) D
r, D, x_2000 = map(int, input().split())
x = x_2000
for _ in range(10):
    print(r * x - D)
    x = r * x - D
