r, D, x = map(int,input().split())

def function(y):
    y = r * y - D

    return y

z = 1
while z <= 10:
    z += 1
    ans = function(x)
    x = function(x)
    print(ans) r, D, x = map(int,input().split()) r map(int,input().split()) map int input().split() ().split () input split D x def function(y):
    y = r * y - D

    return y function y = r * y - D y r * y - D r * y r y D return y y y y z = 1 z 1 while z <= 10:
    z += 1
    ans = function(x)
    x = function(x)
    print(ans) z <= 10 z 10 z += 1 z 1 ans = function(x) ans function(x) function x x = function(x) x function(x) function x print(ans) print ans z += 1 1 z x = function(x) function(x) x r, D, x = map(int,input().split()) map(int,input().split()) r def function(y):
    y = r * y - D

    return y def function(y):
    y = r * y - D

    return y function ans = function(x) function(x) ans D, x = map(int,input().split()) map(int,input().split()) D z = 1 1 z x = map(int,input().split()) map(int,input().split()) x
r, D, x = map(int,input().split())

def function(y):
    y = r * y - D

    return y

z = 1
while z <= 10:
    z += 1
    ans = function(x)
    x = function(x)
    print(ans)