r, D, x2000 = map(int, input().split())
ans = [x2000]
for i in range(10):
    ans.append(r * ans[i] - D)
for i in range(1, 11):
    print(ans[i]) r, D, x2000 = map(int, input().split()) r map(int, input().split()) map int input().split() ().split () input split D x2000 ans = [x2000] ans [x2000] x2000 for i in range(10):
    ans.append(r * ans[i] - D) i range(10) range 10 ans.append(r * ans[i] - D) ans.append ans append r * ans[i] - D r * ans[i] r ans[i] ans i D for i in range(1, 11):
    print(ans[i]) i range(1, 11) range 1 11 print(ans[i]) print ans[i] ans i x2000 = map(int, input().split()) map(int, input().split()) x2000 r, D, x2000 = map(int, input().split()) map(int, input().split()) r ans = [x2000] [x2000] ans D, x2000 = map(int, input().split()) map(int, input().split()) D
r, D, x2000 = map(int, input().split())
ans = [x2000]
for i in range(10):
    ans.append(r * ans[i] - D)
for i in range(1, 11):
    print(ans[i])
