r,D,x=map(int, raw_input().split())
for _ in range(10):
    x=r*x-D
    print x r,D,x=map(int, raw_input().split()) r map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split D x for _ in range(10):
    x=r*x-D
    print x _ range(10) range 10 x=r*x-D x r*x-D r*x r x D print x=r*x-D r*x-D x x=map(int, raw_input().split()) map(int, raw_input().split()) x r,D,x=map(int, raw_input().split()) map(int, raw_input().split()) r D,x=map(int, raw_input().split()) map(int, raw_input().split()) D
r,D,x=map(int, raw_input().split())
for _ in range(10):
    x=r*x-D
    print x