r, d, x = map(int, input().split())

t = r*x - d
print(t)
for i in range(9):
    t = r*t - d
    print(t) r, d, x = map(int, input().split()) r map(int, input().split()) map int input().split() ().split () input split d x t = r*x - d t r*x - d r*x r x d print(t) print t for i in range(9):
    t = r*t - d
    print(t) i range(9) range 9 t = r*t - d t r*t - d r*t r t d print(t) print t r, d, x = map(int, input().split()) map(int, input().split()) r x = map(int, input().split()) map(int, input().split()) x d, x = map(int, input().split()) map(int, input().split()) d t = r*x - d r*x - d t t = r*t - d r*t - d t
r, d, x = map(int, input().split())

t = r*x - d
print(t)
for i in range(9):
    t = r*t - d
    print(t)