r, D, x = list(map(int, input().split()))
X = [x]
for i in range(11):
  X.append(r*X[i]-D)

for j in range(1,11):
  print(X[j]) r, D, x = list(map(int, input().split())) r list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split D x X = [x] X [x] x for i in range(11):
  X.append(r*X[i]-D) i range(11) range 11 X.append(r*X[i]-D) X.append X append r*X[i]-D r*X[i] r X[i] X i D for j in range(1,11):
  print(X[j]) j range(1,11) range 1 11 print(X[j]) print X[j] X j r, D, x = list(map(int, input().split())) list(map(int, input().split())) r x = list(map(int, input().split())) list(map(int, input().split())) x X = [x] [x] X D, x = list(map(int, input().split())) list(map(int, input().split())) D
r, D, x = list(map(int, input().split()))
X = [x]
for i in range(11):
  X.append(r*X[i]-D)

for j in range(1,11):
  print(X[j])