A , B , C = (map(int , input().split()))
a = (A*(C+(0*B))-B)
for i in range(10):
    print(a)
    a = ((A*a)-B) A , B , C = (map(int , input().split())) A map(int , input().split()) map int input().split() ().split () input split B C a = (A*(C+(0*B))-B) a A*(C+(0*B))-B A*(C+(0*B)) A C+(0*B) C 0*B 0 B B for i in range(10):
    print(a)
    a = ((A*a)-B) i range(10) range 10 print(a) print a a = ((A*a)-B) a (A*a)-B A*a A a B B , C = (map(int , input().split())) map(int , input().split()) B a = ((A*a)-B) (A*a)-B a A , B , C = (map(int , input().split())) map(int , input().split()) A C = (map(int , input().split())) map(int , input().split()) C a = (A*(C+(0*B))-B) A*(C+(0*B))-B a
A , B , C = (map(int , input().split()))
a = (A*(C+(0*B))-B)
for i in range(10):
    print(a)
    a = ((A*a)-B)