r,D,x = map(int,input().split())
X = [x]*11

for i in range(0,10):
  X[i+1] = r*X[i] - D
  
  
print(X[1])
print(X[2])
print(X[3])
print(X[4])
print(X[5])
print(X[6])
print(X[7])
print(X[8])
print(X[9])
print(X[10]) r,D,x = map(int,input().split()) r map(int,input().split()) map int input().split() ().split () input split D x X = [x]*11 X [x]*11 [x] x 11 for i in range(0,10):
  X[i+1] = r*X[i] - D
  
   i range(0,10) range 0 10 X[i+1] = r*X[i] - D X[i+1] X i+1 i 1 r*X[i] - D r*X[i] r X[i] X i D print(X[1]) print X[1] X 1 print(X[2]) print X[2] X 2 print(X[3]) print X[3] X 3 print(X[4]) print X[4] X 4 print(X[5]) print X[5] X 5 print(X[6]) print X[6] X 6 print(X[7]) print X[7] X 7 print(X[8]) print X[8] X 8 print(X[9]) print X[9] X 9 print(X[10]) print X[10] X 10 r,D,x = map(int,input().split()) map(int,input().split()) r x = map(int,input().split()) map(int,input().split()) x X = [x]*11 [x]*11 X D,x = map(int,input().split()) map(int,input().split()) D
r,D,x = map(int,input().split())
X = [x]*11

for i in range(0,10):
  X[i+1] = r*X[i] - D
  
  
print(X[1])
print(X[2])
print(X[3])
print(X[4])
print(X[5])
print(X[6])
print(X[7])
print(X[8])
print(X[9])
print(X[10])