a,b,c = map(int,input().split())
x = a * c - b
for _ in range(10):
    print(x)
    x = a * x - b a,b,c = map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b c x = a * c - b x a * c - b a * c a c b for _ in range(10):
    print(x)
    x = a * x - b _ range(10) range 10 print(x) print x x = a * x - b x a * x - b a * x a x b b,c = map(int,input().split()) map(int,input().split()) b a,b,c = map(int,input().split()) map(int,input().split()) a x = a * x - b a * x - b x c = map(int,input().split()) map(int,input().split()) c x = a * c - b a * c - b x
a,b,c = map(int,input().split())
x = a * c - b
for _ in range(10):
    print(x)
    x = a * x - b