r,D,x = map(int,input().rstrip().split(" "))
for i in range(10):
    x = x * r - D
    print(x) r,D,x = map(int,input().rstrip().split(" ")) r map(int,input().rstrip().split(" ")) map int input().rstrip().split(" ") ().rstrip().split ().rstrip() ().rstrip () input rstrip split " " D x for i in range(10):
    x = x * r - D
    print(x) i range(10) range 10 x = x * r - D x x * r - D x * r x r D print(x) print x D,x = map(int,input().rstrip().split(" ")) map(int,input().rstrip().split(" ")) D x = map(int,input().rstrip().split(" ")) map(int,input().rstrip().split(" ")) x r,D,x = map(int,input().rstrip().split(" ")) map(int,input().rstrip().split(" ")) r x = x * r - D x * r - D x
r,D,x = map(int,input().rstrip().split(" "))
for i in range(10):
    x = x * r - D
    print(x)