r, d, x = map(int, input().split())
y = [x]
for i in range(10):
    y.append(r * y[i] - d)
    print(r * y[i] - d) r, d, x = map(int, input().split()) r map(int, input().split()) map int input().split() ().split () input split d x y = [x] y [x] x for i in range(10):
    y.append(r * y[i] - d)
    print(r * y[i] - d) i range(10) range 10 y.append(r * y[i] - d) y.append y append r * y[i] - d r * y[i] r y[i] y i d print(r * y[i] - d) print r * y[i] - d r * y[i] r y[i] y i d d, x = map(int, input().split()) map(int, input().split()) d r, d, x = map(int, input().split()) map(int, input().split()) r x = map(int, input().split()) map(int, input().split()) x y = [x] [x] y
r, d, x = map(int, input().split())
y = [x]
for i in range(10):
    y.append(r * y[i] - d)
    print(r * y[i] - d)